diff --git a/core/src/main/assets/messages/actors/actors.properties b/core/src/main/assets/messages/actors/actors.properties index 4f87319d0..51a495bdd 100644 --- a/core/src/main/assets/messages/actors/actors.properties +++ b/core/src/main/assets/messages/actors/actors.properties @@ -1230,7 +1230,7 @@ actors.hero.talent.shield_of_light.meta_desc=_If this talent is gained by a diff actors.hero.talent.enlightening_meal.title=Enlightening Meal actors.hero.talent.enlightening_meal.desc=_+1:_ Eating food takes the Cleric 1 turn and grants them _1 charge_ on their holy tome.\n\n_+2:_ Eating food takes the Cleric 1 turn and grants them _1.5 charges_ on their holy tome. -actors.hero.talent.enlightening_meal.meta_desc=_If this talent is gained by a different hero_ it will instead grant 2 turns of wand and artifact recharging at +1, or 3 turns at +2. +actors.hero.talent.enlightening_meal.meta_desc=_If this talent is gained by a different hero_ it will instead grant 2 turns of wand and artifact recharging at +1, or 3 turns at +2. This cannot be used to let the horn of plenty recharge itself. actors.hero.talent.recall_inscription.title=Recall Inscription actors.hero.talent.recall_inscription.refunded=Your item was refunded! actors.hero.talent.recall_inscription.desc=_+1:_ The Cleric can cast _Recall Inscription,_ a spell that lets them repeat the effect of the last runestone or scroll they used within _10 turns._\n\n_+2:_ The Cleric can cast _Recall Inscription,_ a spell that lets them repeat the effect of the last runestone or scroll they used within _300 turns._\n\nRecall Inscription cannot be used with scrolls of upgrade. This spell's charge cost varies based on which item was used recently: 2 for a runestone, 3 for a scroll, 4 for an exotic scroll. This charge cost is also doubled when used with a scroll of transmutation, or alchemy items that must be crafted using transmutation or upgrade. 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 a2a5b1958..0810dfabb 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 @@ -596,20 +596,15 @@ public enum Talent { Buff.affect( hero, WandEmpower.class).set(1 + hero.pointsInTalent(EMPOWERING_MEAL), 3); ScrollOfRecharging.charge( hero ); } + int wandChargeTurns = 0; if (hero.hasTalent(ENERGIZING_MEAL)){ //5/8 turns of recharging - Buff.prolong( hero, Recharging.class, 2 + 3*(hero.pointsInTalent(ENERGIZING_MEAL)) ); - ScrollOfRecharging.charge( hero ); - SpellSprite.show(hero, SpellSprite.CHARGE); + wandChargeTurns += 2 + 3*hero.pointsInTalent(ENERGIZING_MEAL); } + int artifactChargeTurns = 0; if (hero.hasTalent(MYSTICAL_MEAL)){ //3/5 turns of recharging - ArtifactRecharge buff = Buff.affect( hero, ArtifactRecharge.class); - if (buff.left() < 1 + 2*(hero.pointsInTalent(MYSTICAL_MEAL))){ - Buff.affect( hero, ArtifactRecharge.class).set(1 + 2*(hero.pointsInTalent(MYSTICAL_MEAL))).ignoreHornOfPlenty = foodSource instanceof HornOfPlenty; - } - ScrollOfRecharging.charge( hero ); - SpellSprite.show(hero, SpellSprite.CHARGE, 0, 1, 1); + artifactChargeTurns += 1 + 2*hero.pointsInTalent(MYSTICAL_MEAL); } if (hero.hasTalent(INVIGORATING_MEAL)){ //effectively 1/2 turns of haste @@ -650,16 +645,26 @@ public enum Talent { ScrollOfRecharging.charge(hero); } } else { - //2/3 turns of recharging - ArtifactRecharge buff = Buff.affect( hero, ArtifactRecharge.class); - if (buff.left() < 1 + (hero.pointsInTalent(ENLIGHTENING_MEAL))){ - Buff.affect( hero, ArtifactRecharge.class).set(1 + (hero.pointsInTalent(ENLIGHTENING_MEAL))).ignoreHornOfPlenty = foodSource instanceof HornOfPlenty; - } - Buff.prolong( hero, Recharging.class, 1 + (hero.pointsInTalent(ENLIGHTENING_MEAL)) ); - ScrollOfRecharging.charge( hero ); - SpellSprite.show(hero, SpellSprite.CHARGE); + //2/3 turns of recharging, both kinds + wandChargeTurns += 1 + hero.pointsInTalent(ENLIGHTENING_MEAL); + artifactChargeTurns += 1 + hero.pointsInTalent(ENLIGHTENING_MEAL); } } + + //we process these at the end as they can stack together from some talents + if (wandChargeTurns > 0){ + Buff.prolong( hero, Recharging.class, wandChargeTurns ); + ScrollOfRecharging.charge( hero ); + SpellSprite.show(hero, SpellSprite.CHARGE); + } + if (artifactChargeTurns > 0){ + ArtifactRecharge buff = Buff.affect( hero, ArtifactRecharge.class); + if (buff.left() < artifactChargeTurns){ + buff.set(artifactChargeTurns).ignoreHornOfPlenty = foodSource instanceof HornOfPlenty; + } + ScrollOfRecharging.charge( hero ); + SpellSprite.show(hero, SpellSprite.CHARGE, 0, 1, 1); + } } public static class WarriorFoodImmunity extends FlavourBuff{