v0.9.1: implemented a T2 item use talent for each hero
This commit is contained in:
parent
9260357c9b
commit
65a6c54b98
Binary file not shown.
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.5 KiB |
|
@ -326,6 +326,8 @@ 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.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_stomach.title=iron stomach
|
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_+1:_ Eating food takes the Warrior 1 turn and grants him _100% damage resistance_ while eating.
|
actors.hero.talent.iron_stomach.desc=_+1:_ Eating food takes the Warrior 1 turn and grants him _75% damage resistance_ while eating.\n\n_+1:_ 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 Warrior's seal shielding_.\n\n_+2:_ Drinking a potion of healing instantly recharges _100% of the Warrior's seal shielding_.\n\nThis talent also triggers when drinking potions or elixirs based on potions of healing.
|
||||||
|
|
||||||
actors.hero.talent.empowering_meal.title=empowering meal
|
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_+1:_ Eating food grants the Mage _3 bonus damage_ on his next 3 wand zaps.
|
actors.hero.talent.empowering_meal.desc=_+1:_ Eating food grants the Mage _2 bonus damage_ on his next 3 wand zaps.\n\n_+1:_ Eating food grants the Mage _3 bonus damage_ on his next 3 wand zaps.
|
||||||
|
@ -338,7 +340,7 @@ actors.hero.talent.backup_barrier.desc=_+1:_ The Mage gains _3 shielding_ whenev
|
||||||
actors.hero.talent.energizing_meal.title=energizing meal
|
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_+1:_ Eating food takes the Mage 1 turn and grants him _8 turns of wand recharging_.
|
actors.hero.talent.energizing_meal.desc=_+1:_ Eating food takes the Mage 1 turn and grants him _5 turns of wand recharging_.\n\n_+1:_ 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.title=energizing upgrade
|
||||||
actors.hero.talent.energizing_upgrade.desc=_+1:_ The Mage's staff recharges for _1 extra charge_ whenever the Mage upgrades it.\n\n_+2:_ The Mage's staff recharges for _2 extra charges_ whenever the Mage upgrades it.
|
actors.hero.talent.energizing_upgrade.desc=_+1:_ Using a scroll of upgrade instantly recharges the Mage's staff _for 1 charge_, this can put it above its current charge cap.\n\n_+2:_ Using a scroll of upgrade instantly recharges the Mage's staff _for 2 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.cached_rations.title=cached rations
|
actors.hero.talent.cached_rations.title=cached rations
|
||||||
actors.hero.talent.cached_rations.desc=_+1:_ The Rogue can find _3 small rations_ placed in chests while he explores the earlier stages of the dungeon.\n\n_+2:_ The Rogue can find _5 small rations_ placed in chests while he explores the earlier stages of the the dungeon.
|
actors.hero.talent.cached_rations.desc=_+1:_ The Rogue can find _3 small rations_ placed in chests while he explores the earlier stages of the dungeon.\n\n_+2:_ The Rogue can find _5 small rations_ placed in chests while he explores the earlier stages of the the dungeon.
|
||||||
|
@ -350,7 +352,8 @@ actors.hero.talent.protective_shadows.title=protective shadows
|
||||||
actors.hero.talent.protective_shadows.desc=_+1:_ The Rogue gains one shielding _every other turn_ his cloak is activated, _to a max of 3_.\n\n_+2:_ The Rogue gains one shielding _every turn_ his cloak is activated, _to a max of 5_.
|
actors.hero.talent.protective_shadows.desc=_+1:_ The Rogue gains one shielding _every other turn_ his cloak is activated, _to a max of 3_.\n\n_+2:_ The Rogue gains one shielding _every turn_ his cloak is activated, _to a max of 5_.
|
||||||
actors.hero.talent.mystical_meal.title=mystical meal
|
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_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 1 charge_, this can put it above its current charge cap.\n\n_+2:_ Using a scroll of upgrade instantly recharges the Rogue's cloak _for 2 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.silent_steps.title=silent steps
|
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.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.title=rogue's foresight
|
||||||
|
@ -365,8 +368,9 @@ actors.hero.talent.followup_strike.desc=_+1:_ When the Huntress hits an enemy wi
|
||||||
actors.hero.talent.natures_aid.title=nature's aid
|
actors.hero.talent.natures_aid.title=nature's aid
|
||||||
actors.hero.talent.natures_aid.desc=_+1:_ The Huntress gains 2 armor of barkskin for _4 turns_ when a plant is trampled in her vision.\n\n_+2:_ The Huntress gains 2 armor of barkskin for _6 turns_ when a plant is trampled in her vision.
|
actors.hero.talent.natures_aid.desc=_+1:_ The Huntress gains 2 armor of barkskin for _4 turns_ when a plant is trampled in her vision.\n\n_+2:_ The Huntress gains 2 armor of barkskin for _6 turns_ when a plant is trampled in her vision.
|
||||||
actors.hero.talent.invigorating_meal.title=invigorating meal
|
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 _2 turns of haste_.\n\n_+1:_ Eating food takes the Huntress 1 turn (berries are eaten instantly) and grants her _3 turns of haste_.
|
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_+1:_ 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_+1:_ 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.durable_projectiles.title=durable projectiles
|
actors.hero.talent.durable_projectiles.title=durable projectiles
|
||||||
actors.hero.talent.durable_projectiles.desc=_+1:_ Thrown weapons have _+50% durability_ when used by the huntress.\n\n_+2:_ Thrown weapons have _+75% durability_ when used by the huntress.
|
actors.hero.talent.durable_projectiles.desc=_+1:_ Thrown weapons have _+50% durability_ when used by the huntress.\n\n_+2:_ Thrown weapons have _+75% durability_ when used by the huntress.
|
||||||
actors.hero.talent.heightened_senses.title=heightened senses
|
actors.hero.talent.heightened_senses.title=heightened senses
|
||||||
|
|
|
@ -23,6 +23,7 @@ package com.shatteredpixel.shatteredpixeldungeon.actors.hero;
|
||||||
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.ArtifactRecharge;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.ArtifactRecharge;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||||
|
@ -30,22 +31,33 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.CounterBuff;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.FlavourBuff;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.FlavourBuff;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Haste;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Haste;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Recharging;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Recharging;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Roots;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.WandEmpower;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.WandEmpower;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
|
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.effects.SpellSprite;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.LeafParticle;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.items.BrokenSeal;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.armor.Armor;
|
import com.shatteredpixel.shatteredpixeldungeon.items.armor.Armor;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.CloakOfShadows;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.HornOfPlenty;
|
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.HornOfPlenty;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.rings.Ring;
|
import com.shatteredpixel.shatteredpixeldungeon.items.rings.Ring;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfRecharging;
|
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfRecharging;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.wands.Wand;
|
import com.shatteredpixel.shatteredpixeldungeon.items.wands.Wand;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.Weapon;
|
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.Weapon;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.MagesStaff;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.MeleeWeapon;
|
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.MeleeWeapon;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles.MissileWeapon;
|
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles.MissileWeapon;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||||
import com.watabou.noosa.audio.Sample;
|
import com.watabou.noosa.audio.Sample;
|
||||||
import com.watabou.noosa.particles.Emitter;
|
import com.watabou.noosa.particles.Emitter;
|
||||||
import com.watabou.utils.Bundle;
|
import com.watabou.utils.Bundle;
|
||||||
|
import com.watabou.utils.PathFinder;
|
||||||
import com.watabou.utils.Random;
|
import com.watabou.utils.Random;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
@ -59,7 +71,7 @@ public enum Talent {
|
||||||
TEST_SUBJECT(2),
|
TEST_SUBJECT(2),
|
||||||
IRON_WILL(3),
|
IRON_WILL(3),
|
||||||
IRON_STOMACH(4),
|
IRON_STOMACH(4),
|
||||||
TEST_WARRIOR_T2_2(5),
|
RESTORED_WILLPOWER(5),
|
||||||
TEST_WARRIOR_T2_3(6),
|
TEST_WARRIOR_T2_3(6),
|
||||||
TEST_WARRIOR_T2_4(7),
|
TEST_WARRIOR_T2_4(7),
|
||||||
TEST_WARRIOR_T2_5(8),
|
TEST_WARRIOR_T2_5(8),
|
||||||
|
@ -79,7 +91,7 @@ public enum Talent {
|
||||||
SUCKER_PUNCH(34),
|
SUCKER_PUNCH(34),
|
||||||
PROTECTIVE_SHADOWS(35),
|
PROTECTIVE_SHADOWS(35),
|
||||||
MYSTICAL_MEAL(36),
|
MYSTICAL_MEAL(36),
|
||||||
TEST_ROGUE_T2_2(37),
|
MYSTICAL_UPGRADE(37),
|
||||||
SILENT_STEPS(38),
|
SILENT_STEPS(38),
|
||||||
ROGUES_FORESIGHT(39),
|
ROGUES_FORESIGHT(39),
|
||||||
TEST_ROGUE_T2_5(40),
|
TEST_ROGUE_T2_5(40),
|
||||||
|
@ -89,7 +101,7 @@ public enum Talent {
|
||||||
FOLLOWUP_STRIKE(50),
|
FOLLOWUP_STRIKE(50),
|
||||||
NATURES_AID(51),
|
NATURES_AID(51),
|
||||||
INVIGORATING_MEAL(52),
|
INVIGORATING_MEAL(52),
|
||||||
TEST_HUNTRESS_T2_2(53),
|
RESTORED_NATURE(53),
|
||||||
DURABLE_PROJECTILES(54),
|
DURABLE_PROJECTILES(54),
|
||||||
HEIGHTENED_SENSES(55),
|
HEIGHTENED_SENSES(55),
|
||||||
TEST_HUNTRESS_T2_5(56);
|
TEST_HUNTRESS_T2_5(56);
|
||||||
|
@ -204,6 +216,71 @@ public enum Talent {
|
||||||
return factor;
|
return factor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void onHealingPotionUsed( Hero hero ){
|
||||||
|
if (hero.hasTalent(RESTORED_WILLPOWER)){
|
||||||
|
BrokenSeal.WarriorShield shield = hero.buff(BrokenSeal.WarriorShield.class);
|
||||||
|
if (shield != null){
|
||||||
|
int shieldToGive = Math.round(shield.maxShield() * 0.33f*(1+hero.pointsInTalent(RESTORED_WILLPOWER)));
|
||||||
|
shield.supercharge(shieldToGive);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (hero.hasTalent(RESTORED_NATURE)){
|
||||||
|
ArrayList<Integer> grassCells = new ArrayList<>();
|
||||||
|
for (int i : PathFinder.NEIGHBOURS8){
|
||||||
|
grassCells.add(hero.pos+i);
|
||||||
|
}
|
||||||
|
Random.shuffle(grassCells);
|
||||||
|
for (int cell : grassCells){
|
||||||
|
Char ch = Actor.findChar(cell);
|
||||||
|
if (ch != null){
|
||||||
|
Buff.affect(ch, Roots.class, 1f + hero.pointsInTalent(RESTORED_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);
|
||||||
|
}
|
||||||
|
CellEmitter.get(cell).burst(LeafParticle.LEVEL_SPECIFIC, 4);
|
||||||
|
}
|
||||||
|
if (hero.pointsInTalent(RESTORED_NATURE) == 1){
|
||||||
|
grassCells.remove(0);
|
||||||
|
grassCells.remove(0);
|
||||||
|
grassCells.remove(0);
|
||||||
|
}
|
||||||
|
for (int cell : grassCells){
|
||||||
|
if (Dungeon.level.map[cell] == Terrain.EMPTY ||
|
||||||
|
Dungeon.level.map[cell] == Terrain.EMBERS ||
|
||||||
|
Dungeon.level.map[cell] == Terrain.EMPTY_DECO ||
|
||||||
|
Dungeon.level.map[cell] == Terrain.GRASS ||
|
||||||
|
Dungeon.level.map[cell] == Terrain.FURROWED_GRASS){
|
||||||
|
Level.set(cell, Terrain.HIGH_GRASS);
|
||||||
|
GameScene.updateMap(cell);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Dungeon.observe();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void onUpgradeScrollUsed( Hero hero ){
|
||||||
|
if (hero.hasTalent(ENERGIZING_UPGRADE)){
|
||||||
|
MagesStaff staff = hero.belongings.getItem(MagesStaff.class);
|
||||||
|
if (staff != null){
|
||||||
|
staff.gainCharge( hero.pointsInTalent(ENERGIZING_UPGRADE), true);
|
||||||
|
ScrollOfRecharging.charge( Dungeon.hero );
|
||||||
|
SpellSprite.show( hero, SpellSprite.CHARGE );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (hero.hasTalent(MYSTICAL_UPGRADE)){
|
||||||
|
CloakOfShadows cloak = hero.belongings.getItem(CloakOfShadows.class);
|
||||||
|
if (cloak != null){
|
||||||
|
cloak.overCharge(hero.pointsInTalent(MYSTICAL_UPGRADE));
|
||||||
|
ScrollOfRecharging.charge( Dungeon.hero );
|
||||||
|
SpellSprite.show( hero, SpellSprite.CHARGE );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static void onItemEquipped( Hero hero, Item item ){
|
public static void onItemEquipped( Hero hero, Item item ){
|
||||||
if (hero.pointsInTalent(ARMSMASTERS_INTUITION) == 2 && (item instanceof Weapon || item instanceof Armor)){
|
if (hero.pointsInTalent(ARMSMASTERS_INTUITION) == 2 && (item instanceof Weapon || item instanceof Armor)){
|
||||||
item.identify();
|
item.identify();
|
||||||
|
@ -300,16 +377,16 @@ public enum Talent {
|
||||||
//tier 2+
|
//tier 2+
|
||||||
switch (cls){
|
switch (cls){
|
||||||
case WARRIOR: default:
|
case WARRIOR: default:
|
||||||
Collections.addAll(tierTalents, IRON_STOMACH, TEST_WARRIOR_T2_2, TEST_WARRIOR_T2_3, TEST_WARRIOR_T2_4, TEST_WARRIOR_T2_5);
|
Collections.addAll(tierTalents, IRON_STOMACH, RESTORED_WILLPOWER, TEST_WARRIOR_T2_3, TEST_WARRIOR_T2_4, TEST_WARRIOR_T2_5);
|
||||||
break;
|
break;
|
||||||
case MAGE:
|
case MAGE:
|
||||||
Collections.addAll(tierTalents, ENERGIZING_MEAL, ENERGIZING_UPGRADE, TEST_MAGE_T2_3, TEST_MAGE_T2_4, TEST_MAGE_T2_5);
|
Collections.addAll(tierTalents, ENERGIZING_MEAL, ENERGIZING_UPGRADE, TEST_MAGE_T2_3, TEST_MAGE_T2_4, TEST_MAGE_T2_5);
|
||||||
break;
|
break;
|
||||||
case ROGUE:
|
case ROGUE:
|
||||||
Collections.addAll(tierTalents, MYSTICAL_MEAL, TEST_ROGUE_T2_2, SILENT_STEPS, ROGUES_FORESIGHT, TEST_ROGUE_T2_5);
|
Collections.addAll(tierTalents, MYSTICAL_MEAL, MYSTICAL_UPGRADE, SILENT_STEPS, ROGUES_FORESIGHT, TEST_ROGUE_T2_5);
|
||||||
break;
|
break;
|
||||||
case HUNTRESS:
|
case HUNTRESS:
|
||||||
Collections.addAll(tierTalents, INVIGORATING_MEAL, TEST_HUNTRESS_T2_2, DURABLE_PROJECTILES, HEIGHTENED_SENSES, TEST_HUNTRESS_T2_5);
|
Collections.addAll(tierTalents, INVIGORATING_MEAL, RESTORED_NATURE, DURABLE_PROJECTILES, HEIGHTENED_SENSES, TEST_HUNTRESS_T2_5);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
for (Talent talent : tierTalents){
|
for (Talent talent : tierTalents){
|
||||||
|
|
|
@ -149,6 +149,11 @@ public class CloakOfShadows extends Artifact {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void overCharge(int amount){
|
||||||
|
charge = Math.min(charge+amount, chargeCap+amount);
|
||||||
|
updateQuickslot();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Item upgrade() {
|
public Item upgrade() {
|
||||||
|
|
|
@ -36,6 +36,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Vertigo;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Vulnerable;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Vulnerable;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Weakness;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Weakness;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
||||||
|
@ -53,6 +54,7 @@ public class PotionOfHealing extends Potion {
|
||||||
identify();
|
identify();
|
||||||
cure( hero );
|
cure( hero );
|
||||||
heal( hero );
|
heal( hero );
|
||||||
|
Talent.onHealingPotionUsed( hero );
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void heal( Char ch ){
|
public static void heal( Char ch ){
|
||||||
|
|
|
@ -25,6 +25,7 @@ import com.shatteredpixel.shatteredpixeldungeon.Challenges;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
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.Speck;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfHealing;
|
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfHealing;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.quest.GooBlob;
|
import com.shatteredpixel.shatteredpixeldungeon.items.quest.GooBlob;
|
||||||
|
@ -49,6 +50,7 @@ public class ElixirOfAquaticRejuvenation extends Elixir {
|
||||||
PotionOfHealing.pharmacophobiaProc(hero);
|
PotionOfHealing.pharmacophobiaProc(hero);
|
||||||
} else {
|
} else {
|
||||||
Buff.affect(hero, AquaHealing.class).set(Math.round(hero.HT * 1.5f));
|
Buff.affect(hero, AquaHealing.class).set(Math.round(hero.HT * 1.5f));
|
||||||
|
Talent.onHealingPotionUsed( hero );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -28,6 +28,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Hunger;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Hunger;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Bee;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Bee;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.Honeypot;
|
import com.shatteredpixel.shatteredpixeldungeon.items.Honeypot;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfHealing;
|
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfHealing;
|
||||||
|
@ -44,6 +45,7 @@ public class ElixirOfHoneyedHealing extends Elixir {
|
||||||
public void apply(Hero hero) {
|
public void apply(Hero hero) {
|
||||||
PotionOfHealing.cure(hero);
|
PotionOfHealing.cure(hero);
|
||||||
PotionOfHealing.heal(hero);
|
PotionOfHealing.heal(hero);
|
||||||
|
Talent.onHealingPotionUsed( hero );
|
||||||
Buff.affect(hero, Hunger.class).satisfy(Hunger.STARVING/5f);
|
Buff.affect(hero, Hunger.class).satisfy(Hunger.STARVING/5f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,7 @@ import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Barrier;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Barrier;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
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.items.potions.PotionOfHealing;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||||
|
|
||||||
|
@ -44,6 +45,7 @@ public class PotionOfShielding extends ExoticPotion {
|
||||||
} else {
|
} else {
|
||||||
//~75% of a potion of healing
|
//~75% of a potion of healing
|
||||||
Buff.affect(hero, Barrier.class).setShield((int) (0.6f * hero.HT + 10));
|
Buff.affect(hero, Barrier.class).setShield((int) (0.6f * hero.HT + 10));
|
||||||
|
Talent.onHealingPotionUsed( hero );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,6 +26,7 @@ import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Statistics;
|
import com.shatteredpixel.shatteredpixeldungeon.Statistics;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Degrade;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Degrade;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
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.Speck;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.ShadowParticle;
|
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.ShadowParticle;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||||
|
@ -102,6 +103,8 @@ public class ScrollOfUpgrade extends InventoryScroll {
|
||||||
} else {
|
} else {
|
||||||
item.upgrade();
|
item.upgrade();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Talent.onUpgradeScrollUsed( Dungeon.hero );
|
||||||
|
|
||||||
Badges.validateItemLevelAquired( item );
|
Badges.validateItemLevelAquired( item );
|
||||||
Statistics.upgradesUsed++;
|
Statistics.upgradesUsed++;
|
||||||
|
|
|
@ -22,6 +22,8 @@
|
||||||
package com.shatteredpixel.shatteredpixeldungeon.items.scrolls.exotic;
|
package com.shatteredpixel.shatteredpixeldungeon.items.scrolls.exotic;
|
||||||
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.effects.Enchanting;
|
import com.shatteredpixel.shatteredpixeldungeon.effects.Enchanting;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.armor.Armor;
|
import com.shatteredpixel.shatteredpixeldungeon.items.armor.Armor;
|
||||||
|
@ -81,6 +83,7 @@ public class ScrollOfEnchantment extends ExoticScroll {
|
||||||
|
|
||||||
Sample.INSTANCE.play( Assets.Sounds.READ );
|
Sample.INSTANCE.play( Assets.Sounds.READ );
|
||||||
Enchanting.show(curUser, item);
|
Enchanting.show(curUser, item);
|
||||||
|
Talent.onUpgradeScrollUsed( Dungeon.hero );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -117,6 +120,7 @@ public class ScrollOfEnchantment extends ExoticScroll {
|
||||||
|
|
||||||
Sample.INSTANCE.play( Assets.Sounds.READ );
|
Sample.INSTANCE.play( Assets.Sounds.READ );
|
||||||
Enchanting.show(curUser, item);
|
Enchanting.show(curUser, item);
|
||||||
|
Talent.onUpgradeScrollUsed( Dungeon.hero );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,9 @@
|
||||||
package com.shatteredpixel.shatteredpixeldungeon.items.spells;
|
package com.shatteredpixel.shatteredpixeldungeon.items.spells;
|
||||||
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Badges;
|
import com.shatteredpixel.shatteredpixeldungeon.Badges;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Statistics;
|
import com.shatteredpixel.shatteredpixeldungeon.Statistics;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
|
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.armor.Armor;
|
import com.shatteredpixel.shatteredpixeldungeon.items.armor.Armor;
|
||||||
|
@ -54,7 +56,7 @@ public class MagicalInfusion extends InventorySpell {
|
||||||
}
|
}
|
||||||
|
|
||||||
GLog.p( Messages.get(this, "infuse", item.name()) );
|
GLog.p( Messages.get(this, "infuse", item.name()) );
|
||||||
|
Talent.onUpgradeScrollUsed( Dungeon.hero );
|
||||||
Badges.validateItemLevelAquired(item);
|
Badges.validateItemLevelAquired(item);
|
||||||
|
|
||||||
curUser.sprite.emitter().start(Speck.factory(Speck.UP), 0.2f, 3);
|
curUser.sprite.emitter().start(Speck.factory(Speck.UP), 0.2f, 3);
|
||||||
|
|
|
@ -146,11 +146,16 @@ public abstract class Wand extends Item {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void gainCharge( float amt ){
|
public void gainCharge( float amt ){
|
||||||
|
gainCharge( amt, false );
|
||||||
|
}
|
||||||
|
|
||||||
|
public void gainCharge( float amt, boolean overcharge ){
|
||||||
partialCharge += amt;
|
partialCharge += amt;
|
||||||
while (partialCharge >= 1) {
|
while (partialCharge >= 1) {
|
||||||
curCharges = Math.min(maxCharges, curCharges+1);
|
if (overcharge) curCharges = Math.min(maxCharges+(int)amt, curCharges+1);
|
||||||
|
else curCharges = Math.min(maxCharges, curCharges+1);
|
||||||
partialCharge--;
|
partialCharge--;
|
||||||
updateQuickslot();
|
updateQuickslot();
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,8 +27,6 @@ import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroSubClass;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroSubClass;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent;
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.effects.SpellSprite;
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.ElmoParticle;
|
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.ElmoParticle;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.bags.Bag;
|
import com.shatteredpixel.shatteredpixeldungeon.items.bags.Bag;
|
||||||
|
@ -217,10 +215,14 @@ public class MagesStaff extends MeleeWeapon {
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void gainCharge( float amt ){
|
public void gainCharge( float amt ){
|
||||||
|
gainCharge(amt, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void gainCharge( float amt, boolean overcharge ){
|
||||||
if (wand != null){
|
if (wand != null){
|
||||||
wand.gainCharge(amt);
|
wand.gainCharge(amt, overcharge);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -234,14 +236,6 @@ public class MagesStaff extends MeleeWeapon {
|
||||||
|
|
||||||
updateWand(true);
|
updateWand(true);
|
||||||
|
|
||||||
if (wand != null && Dungeon.hero.hasTalent(Talent.ENERGIZING_UPGRADE)){
|
|
||||||
wand.curCharges += Dungeon.hero.pointsInTalent(Talent.ENERGIZING_UPGRADE);
|
|
||||||
wand.curCharges = Math.min( wand.curCharges, wand.maxCharges + Dungeon.hero.pointsInTalent(Talent.ENERGIZING_UPGRADE));
|
|
||||||
ScrollOfRecharging.charge( Dungeon.hero );
|
|
||||||
SpellSprite.show( curUser, SpellSprite.CHARGE );
|
|
||||||
updateQuickslot();
|
|
||||||
}
|
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user