v0.9.0: implemented two more talents for the Mage

This commit is contained in:
Evan Debenham 2020-09-15 21:00:54 -04:00
parent 7e1101635b
commit 0dc3a21436
25 changed files with 63 additions and 41 deletions

View File

@ -301,17 +301,17 @@ actors.hero.talent.hearty_meal.desc=_+1:_ Eating at below 50% health heals the W
actors.hero.talent.armsmasters_intuition.title=armsmaster's intuition
actors.hero.talent.armsmasters_intuition.desc=_+1:_ The Warrior identifies weapons and armor _2x faster_.\n\n_+2:_ The Warrior identifies weapons and armor _when he equips them_.
actors.hero.talent.test_subject.title=test subject
actors.hero.talent.test_subject.desc=_+1:_ Whenever he identifies a potion by using it, the warrior heals for _3 HP_.\n\n_+2:_ Whenever he identifies a potion by using it, the warrior heals for _5 HP_.
actors.hero.talent.test_subject.desc=_+1:_ Whenever he identifies a potion by using it, the Warrior heals for _3 HP_.\n\n_+2:_ Whenever he identifies a potion by using it, the Warrior heals for _5 HP_.
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.energizing_meal.title=energizing meal
actors.hero.talent.energizing_meal.desc=_+1:_ Eating at below 50% health grants the Mage _4 turns of wand recharging_.\n\n_+2:_ Eating at below 50% health grants the Mage _6 turns of wand recharging_.
actors.hero.talent.scholars_intuition.title=scholar's intuition
actors.hero.talent.scholars_intuition.desc=_+1:_ The Mage identifies wands _2x faster_.\n\n_+2:_ The Mage identifies wands _when he uses them_.
actors.hero.talent.test_mage_3.title=test talent
actors.hero.talent.test_mage_3.desc=TODO
actors.hero.talent.test_mage_4.title=test talent
actors.hero.talent.test_mage_4.desc=TODO
actors.hero.talent.tested_hypothesis.title=tested hypothesis
actors.hero.talent.tested_hypothesis.desc=_+1:_ Whenever he identifies a scroll by using it, the Mage gains _6 shielding_.\n\n_+2:_ Whenever he identifies a scroll by using it, the Mage gains _9 shielding_.
actors.hero.talent.energizing_upgrade.title=energizing upgrade
actors.hero.talent.energizing_upgrade.desc=_+1:_ The Mage's staff gains _1 extra charge_ whenever the Mage upgrades it.\n\n_+2:_ The Mage's staff gains _2 extra charges_ whenever the Mage upgrades it.
actors.hero.talent.rationed_meal.title=rationed meal
actors.hero.talent.rationed_meal.desc=_+1:_ Eating at below 50% health gives the Rogue _20% more satiety_.\n\n_+2:_ Eating at below 50% health gives the Rogue _30% more satiety_.
actors.hero.talent.thiefs_intuition.title=thief's intuition

View File

@ -50,8 +50,8 @@ public enum Talent {
ENERGIZING_MEAL(16),
SCHOLARS_INTUITION(17),
TEST_MAGE_3(18),
TEST_MAGE_4(19),
TESTED_HYPOTHESIS(18),
ENERGIZING_UPGRADE(19),
RATIONED_MEAL(32),
THIEFS_INTUITION(33),
@ -182,7 +182,7 @@ public enum Talent {
Collections.addAll(tierTalents, HEARTY_MEAL, ARMSMASTERS_INTUITION, TEST_SUBJECT, IRON_WILL);
break;
case MAGE:
Collections.addAll(tierTalents, ENERGIZING_MEAL, SCHOLARS_INTUITION, TEST_MAGE_3, TEST_MAGE_4);
Collections.addAll(tierTalents, ENERGIZING_MEAL, SCHOLARS_INTUITION, TESTED_HYPOTHESIS, ENERGIZING_UPGRADE);
break;
case ROGUE:
Collections.addAll(tierTalents, RATIONED_MEAL, THIEFS_INTUITION, TEST_ROGUE_3, TEST_ROGUE_4);

View File

@ -38,7 +38,7 @@ public abstract class InventoryScroll extends Scroll {
public void doRead() {
if (!isKnown()) {
setKnown();
identify();
identifiedByUse = true;
} else {
identifiedByUse = false;

View File

@ -22,10 +22,13 @@
package com.shatteredpixel.shatteredpixeldungeon.items.scrolls;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Barrier;
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.hero.Hero;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent;
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
import com.shatteredpixel.shatteredpixeldungeon.items.ItemStatusHandler;
import com.shatteredpixel.shatteredpixeldungeon.items.Recipe;
@ -217,7 +220,16 @@ public abstract class Scroll extends Item {
@Override
public Item identify() {
setKnown();
if (!isKnown()) {
setKnown();
//6/9 HP barrier
Hero hero = Dungeon.hero;
if (hero.hasTalent(Talent.TESTED_HYPOTHESIS)) {
Buff.affect(hero, Barrier.class).setShield(3 + (3 * hero.pointsInTalent(Talent.TESTED_HYPOTHESIS)));
ScrollOfRecharging.charge(hero);
}
}
return super.identify();
}

View File

@ -55,7 +55,7 @@ public class ScrollOfLullaby extends Scroll {
GLog.i( Messages.get(this, "sooth") );
setKnown();
identify();
readAnimation();
}

View File

@ -78,8 +78,8 @@ public class ScrollOfMagicMapping extends Scroll {
SpellSprite.show( curUser, SpellSprite.MAP );
Sample.INSTANCE.play( Assets.Sounds.READ );
setKnown();
identify();
readAnimation();
}

View File

@ -50,7 +50,7 @@ public class ScrollOfMirrorImage extends Scroll {
int spawnedImages = spawnImages(curUser, NIMAGES);
if (spawnedImages > 0) {
setKnown();
identify();
}
Sample.INSTANCE.play( Assets.Sounds.READ );

View File

@ -50,7 +50,7 @@ public class ScrollOfRage extends Scroll {
}
GLog.w( Messages.get(this, "roar") );
setKnown();
identify();
curUser.sprite.centerEmitter().start( Speck.factory( Speck.SCREAM ), 0.3f, 3 );
Sample.INSTANCE.play( Assets.Sounds.CHALLENGE );

View File

@ -49,7 +49,7 @@ public class ScrollOfRecharging extends Scroll {
GLog.i( Messages.get(this, "surge") );
SpellSprite.show( curUser, SpellSprite.CHARGE );
setKnown();
identify();
readAnimation();
}

View File

@ -61,8 +61,8 @@ public class ScrollOfRetribution extends Scroll {
Buff.prolong(curUser, Weakness.class, Weakness.DURATION);
Buff.prolong(curUser, Blindness.class, Blindness.DURATION);
Dungeon.observe();
setKnown();
identify();
readAnimation();

View File

@ -57,7 +57,7 @@ public class ScrollOfTeleportation extends Scroll {
Sample.INSTANCE.play( Assets.Sounds.READ );
teleportPreferringUnseen( curUser );
setKnown();
identify();
readAnimation();
}

View File

@ -68,7 +68,7 @@ public class ScrollOfTerror extends Scroll {
default:
GLog.i( Messages.get(this, "many") );
}
setKnown();
identify();
readAnimation();
}

View File

@ -50,8 +50,8 @@ public class ScrollOfAffection extends ExoticScroll {
}
//GLog.i( Messages.get(this, "sooth") );
setKnown();
identify();
readAnimation();

View File

@ -37,8 +37,8 @@ public class ScrollOfAntiMagic extends ExoticScroll {
Buff.affect( curUser, MagicImmune.class, MagicImmune.DURATION );
new Flare( 5, 32 ).color( 0xFF0000, true ).show( curUser.sprite, 2f );
setKnown();
identify();
readAnimation();
}

View File

@ -46,8 +46,8 @@ public class ScrollOfConfusion extends ExoticScroll {
Buff.prolong(mob, Blindness.class, Blindness.DURATION);
}
}
setKnown();
identify();
curUser.sprite.centerEmitter().start( Speck.factory( Speck.SCREAM ), 0.3f, 3 );
Sample.INSTANCE.play( Assets.Sounds.READ );

View File

@ -119,7 +119,7 @@ public class ScrollOfDivination extends ExoticScroll {
GameScene.show(new WndDivination( IDed ));
readAnimation();
setKnown();
identify();
}
private class WndDivination extends Window {

View File

@ -45,7 +45,7 @@ public class ScrollOfEnchantment extends ExoticScroll {
@Override
public void doRead() {
setKnown();
identify();
GameScene.selectItem( itemSelector, WndBag.Mode.ENCHANTABLE, Messages.get(this, "inv_title"));
}

View File

@ -40,8 +40,8 @@ public class ScrollOfForesight extends ExoticScroll {
Sample.INSTANCE.play( Assets.Sounds.READ );
Buff.affect(curUser, Foresight.class, Foresight.DURATION);
setKnown();
identify();
readAnimation();
}

View File

@ -45,7 +45,7 @@ public class ScrollOfMysticalEnergy extends ExoticScroll {
Sample.INSTANCE.play( Assets.Sounds.CHARGEUP );
SpellSprite.show( curUser, SpellSprite.CHARGE );
setKnown();
identify();
ScrollOfRecharging.charge(curUser);
readAnimation();

View File

@ -40,8 +40,8 @@ public class ScrollOfPassage extends ExoticScroll {
@Override
public void doRead() {
setKnown();
identify();
if (Dungeon.bossLevel()) {

View File

@ -47,8 +47,8 @@ public class ScrollOfPetrification extends ExoticScroll {
Buff.affect( mob, Paralysis.class, Paralysis.DURATION );
}
}
setKnown();
identify();
readAnimation();
}

View File

@ -71,7 +71,7 @@ public class ScrollOfPolymorph extends ExoticScroll {
}
}
}
setKnown();
identify();
readAnimation();

View File

@ -52,8 +52,8 @@ public class ScrollOfPrismaticImage extends ExoticScroll {
if (!found) {
Buff.affect(curUser, PrismaticGuard.class).set( PrismaticGuard.maxHP( curUser ) );
}
setKnown();
identify();
Sample.INSTANCE.play( Assets.Sounds.READ );

View File

@ -67,8 +67,8 @@ public class ScrollOfPsionicBlast extends ExoticScroll {
Dungeon.fail( getClass() );
GLog.n( Messages.get(this, "ondeath") );
}
setKnown();
identify();
}

View File

@ -27,6 +27,8 @@ import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
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.items.Item;
import com.shatteredpixel.shatteredpixeldungeon.items.bags.Bag;
@ -232,6 +234,14 @@ public class MagesStaff extends MeleeWeapon {
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;
}