From cacc68942998e84d8a091e38fac84fcaac4bc157 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Sat, 6 Feb 2021 17:52:34 -0500 Subject: [PATCH] v0.9.2: implemented the soul eater talent --- core/src/main/assets/messages/actors/actors.properties | 2 ++ .../shatteredpixeldungeon/actors/hero/Talent.java | 4 ++-- .../shatteredpixeldungeon/actors/mobs/Mob.java | 8 +++++++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/core/src/main/assets/messages/actors/actors.properties b/core/src/main/assets/messages/actors/actors.properties index e7de51882..3d15cd3d6 100644 --- a/core/src/main/assets/messages/actors/actors.properties +++ b/core/src/main/assets/messages/actors/actors.properties @@ -363,6 +363,8 @@ actors.hero.talent.empowered_strike.title=empowered strike actors.hero.talent.empowered_strike.desc=_+1:_ The Battlemage's first melee strike with his staff after zapping with it deals _+17% damage_.\n\n_+2:_ The Battlemage's first melee strike with his staff after zapping with it deals _+33% damage_.\n\n_+3:_ The Battlemage's first melee strike with his staff after zapping with it deals _+50% damage_. actors.hero.talent.soul_siphon.title=soul siphon actors.hero.talent.soul_siphon.desc=_+1:_ Melee damage dealt by other characters triggers the Warlock's soul mark at _15% effectiveness_.\n\n_+2:_ Melee damage dealt by other characters triggers the Warlock's soul mark at _30% effectiveness_.\n\n_+3:_ Melee damage dealt by other characters triggers the Warlock's soul mark at _45% effectiveness_. +actors.hero.talent.soul_eater.title=soul eater +actors.hero.talent.soul_eater.desc=_+1:_ Soul mark grants _0.33 turns_ of satiety for each damage dealt. Soul marked enemies have a _10% chance_ to trigger on-eat effects when they die.\n\n_+1:_ Soul mark grants _0.67 turns_ of satiety for each damage dealt. Soul marked enemies have a _20% chance_ to trigger on-eat effects when they die.\n\n_+3:_ Soul mark grants _1 turn_ of satiety for each damage dealt. Soul marked enemies have a _30% chance_ to trigger on-eat effects when they die. actors.hero.talent.cached_rations.title=cached rations actors.hero.talent.cached_rations.desc=_+1:_ The Rogue can find _4 small rations_ placed in chests while he explores the earlier stages of the dungeon.\n\n_+2:_ The Rogue can find _6 small rations_ placed in chests while he explores the earlier stages of the the dungeon. 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 cb9bebcf7..da04e999a 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 @@ -86,7 +86,7 @@ public enum Talent { //Battlemage T3 EMPOWERED_STRIKE(43, 3), BATTLEMAGE_T3_2(44, 3), BATTLEMAGE_T3_3(45, 3), //Warlock T3 - SOUL_SIPHON(46, 3), WARLOCK_T3_2(47, 3), WARLOCK_T3_3(48, 3), + SOUL_SIPHON(46, 3), SOUL_EATER(47, 3), WARLOCK_T3_3(48, 3), //Rogue T1 CACHED_RATIONS(64), THIEFS_INTUITION(65), SUCKER_PUNCH(66), PROTECTIVE_SHADOWS(67), @@ -467,7 +467,7 @@ public enum Talent { Collections.addAll(tierTalents, EMPOWERED_STRIKE, BATTLEMAGE_T3_2, BATTLEMAGE_T3_3); break; case WARLOCK: - Collections.addAll(tierTalents, SOUL_SIPHON, WARLOCK_T3_2, WARLOCK_T3_3); + Collections.addAll(tierTalents, SOUL_SIPHON, SOUL_EATER, WARLOCK_T3_3); break; case ASSASSIN: Collections.addAll(tierTalents, ENHANCED_LETHALITY, ASSASSIN_T3_2, BOUNTY_HUNTER); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mob.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mob.java index 0c79a3717..ddadb7784 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mob.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mob.java @@ -598,7 +598,7 @@ public abstract class Mob extends Char { restoration = Math.round(restoration * 0.15f*Dungeon.hero.pointsInTalent(Talent.SOUL_SIPHON)); } if (restoration > 0) { - Buff.affect(Dungeon.hero, Hunger.class).satisfy(restoration); + Buff.affect(Dungeon.hero, Hunger.class).affectHunger(restoration*Dungeon.hero.pointsInTalent(Talent.SOUL_EATER)/3f); Dungeon.hero.HP = (int) Math.ceil(Math.min(Dungeon.hero.HT, Dungeon.hero.HP + (restoration * 0.4f))); Dungeon.hero.sprite.emitter().burst(Speck.factory(Speck.HEALING), 1); } @@ -718,6 +718,12 @@ public abstract class Mob extends Char { Lucky.showFlare(sprite); } + //soul eater talent + if (buff(SoulMark.class) != null && + Random.Int(10) < Dungeon.hero.pointsInTalent(Talent.SOUL_EATER)){ + Talent.onFoodEaten(Dungeon.hero, 0, null); + } + //bounty hunter talent if (Dungeon.hero.buff(Talent.BountyHunterTracker.class) != null){ Dungeon.level.drop(new Gold(10 * Dungeon.hero.pointsInTalent(Talent.BOUNTY_HUNTER)), pos).sprite.drop();