v0.9.1: tweaked the warrior's T1 talents

This commit is contained in:
Evan Debenham 2020-11-12 18:21:41 -05:00
parent 430566f0e6
commit ad70ff52aa
7 changed files with 43 additions and 36 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 996 B

After

Width:  |  Height:  |  Size: 986 B

View File

@ -314,11 +314,11 @@ actors.buffs.wellfed.desc=You feel quite satisfied and full.\n\nWhile well fed,
###hero
actors.hero.talent.hearty_meal.title=hearty meal
actors.hero.talent.hearty_meal.desc=_+1:_ Eating at below 50% health heals the Warrior for _3 HP_.\n\n_+2:_ Eating at below 50% health heals the Warrior for _5 HP_.
actors.hero.talent.hearty_meal.desc=_+1:_ Eating heals the Warrior for _2 HP_ when he is below 50% health, and _3 HP_ when he is below 25% health.\n\n_+2:_ Eating heals the Warrior for _3 HP_ when he is below 50% health, and _5 HP_ when he is below 25% health.
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 _4 HP_.\n\n_+2:_ Whenever he identifies a potion by using it, the Warrior heals for _6 HP_.
actors.hero.talent.test_subject.desc=_+1:_ Whenever the Warrior identifies an item, he heals for _2 HP_.\n\n_+2:_ Whenever the Warrior identifies an item, he heals for _3 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.energizing_meal.title=energizing meal

View File

@ -24,6 +24,7 @@ package com.shatteredpixel.shatteredpixeldungeon.actors.hero;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Barrier;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Haste;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Hunger;
@ -33,6 +34,7 @@ import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
import com.shatteredpixel.shatteredpixeldungeon.items.armor.Armor;
import com.shatteredpixel.shatteredpixeldungeon.items.rings.Ring;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.Scroll;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfRecharging;
import com.shatteredpixel.shatteredpixeldungeon.items.wands.Wand;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.Weapon;
@ -40,6 +42,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.MeleeWeapon;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles.MissileWeapon;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.watabou.noosa.audio.Sample;
import com.watabou.noosa.particles.Emitter;
import com.watabou.utils.Bundle;
import com.watabou.utils.Random;
@ -135,10 +138,16 @@ public enum Talent {
}
public static void onFoodEaten( Hero hero, float foodVal ){
if (hero.hasTalent(HEARTY_MEAL) && hero.HP <= hero.HT/2){
//3/5 HP healed, when hero is below 50% health
hero.HP = Math.min( hero.HP + 1 + 2*hero.pointsInTalent(HEARTY_MEAL), hero.HT );
hero.sprite.emitter().burst( Speck.factory( Speck.HEALING ), hero.pointsInTalent(HEARTY_MEAL) );
if (hero.hasTalent(HEARTY_MEAL)){
//3/5 HP healed, when hero is below 25% health
if (hero.HP <= hero.HT/4) {
hero.HP = Math.min(hero.HP + 1 + 2 * hero.pointsInTalent(HEARTY_MEAL), hero.HT);
hero.sprite.emitter().burst(Speck.factory(Speck.HEALING), hero.pointsInTalent(HEARTY_MEAL));
//2/3 HP healed, when hero is below 50% health
} else if (hero.HP <= hero.HT/2){
hero.HP = Math.min(hero.HP + 1 + hero.pointsInTalent(HEARTY_MEAL), hero.HT);
hero.sprite.emitter().burst(Speck.factory(Speck.HEALING), 1+hero.pointsInTalent(HEARTY_MEAL));
}
}
if (hero.hasTalent(ENERGIZING_MEAL)){
//5/8 turns of recharging
@ -196,6 +205,20 @@ public enum Talent {
}
}
//note that IDing can happen in alchemy scene, so be careful with VFX here
public static void onItemIdentified( Hero hero, Item item ){
if (hero.hasTalent(TEST_SUBJECT)){
//heal for 2/3 HP
hero.HP = Math.min(hero.HP + 1 + hero.pointsInTalent(TEST_SUBJECT), hero.HT);
Emitter e = hero.sprite.emitter();
if (e != null) e.burst(Speck.factory(Speck.HEALING), hero.pointsInTalent(TEST_SUBJECT));
}
if (item instanceof Scroll && hero.hasTalent(TESTED_HYPOTHESIS)){
Buff.affect(hero, Barrier.class).setShield(3 + (3 * hero.pointsInTalent(Talent.TESTED_HYPOTHESIS)), 1);
ScrollOfRecharging.charge(hero);
}
}
public static int onAttackProc( Hero hero, Char enemy, int dmg ){
if (hero.hasTalent(Talent.SUCKER_PUNCH)
&& enemy instanceof Mob && ((Mob) enemy).surprisedBy(hero)

View File

@ -374,13 +374,14 @@ public class Item implements Bundlable {
public Item identify() {
if (Dungeon.hero != null && Dungeon.hero.isAlive()){
Catalog.setSeen(getClass());
if (!isIdentified()) Talent.onItemIdentified(Dungeon.hero, this);
}
levelKnown = true;
cursedKnown = true;
if (Dungeon.hero != null && Dungeon.hero.isAlive()) {
Catalog.setSeen(getClass());
}
return this;
}

View File

@ -33,8 +33,6 @@ 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.Speck;
import com.shatteredpixel.shatteredpixeldungeon.effects.Splash;
import com.shatteredpixel.shatteredpixeldungeon.items.Generator;
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
@ -72,7 +70,6 @@ import com.shatteredpixel.shatteredpixeldungeon.windows.WndBag;
import com.shatteredpixel.shatteredpixeldungeon.windows.WndOptions;
import com.shatteredpixel.shatteredpixeldungeon.windows.WndUseItem;
import com.watabou.noosa.audio.Sample;
import com.watabou.noosa.particles.Emitter;
import com.watabou.utils.Bundle;
import com.watabou.utils.Random;
import com.watabou.utils.Reflection;
@ -354,18 +351,12 @@ public class Potion extends Item {
@Override
public Item identify() {
super.identify();
if (!isKnown()) {
setKnown();
//4/6 HP healed
Hero hero = Dungeon.hero;
if (hero.isAlive() && hero.hasTalent(Talent.TEST_SUBJECT)) {
hero.HP = Math.min(hero.HP + 2 * (1+hero.pointsInTalent(Talent.TEST_SUBJECT)), hero.HT);
Emitter e = hero.sprite.emitter();
if (e != null) e.burst(Speck.factory(Speck.HEALING), hero.pointsInTalent(Talent.TEST_SUBJECT));
}
}
return super.identify();
return this;
}
@Override
@ -512,7 +503,7 @@ public class Potion extends Item {
}
if (seeds.size() == 1){
result.setKnown();
result.identify();
}
while (result instanceof PotionOfHealing

View File

@ -22,13 +22,10 @@
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.Generator;
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
import com.shatteredpixel.shatteredpixeldungeon.items.ItemStatusHandler;
@ -206,17 +203,12 @@ public abstract class Scroll extends Item {
@Override
public Item identify() {
super.identify();
if (!isKnown()) {
setKnown();
//6/9 HP barrier
Hero hero = Dungeon.hero;
if (hero.isAlive() && hero.hasTalent(Talent.TESTED_HYPOTHESIS)) {
Buff.affect(hero, Barrier.class).setShield(3 + (3 * hero.pointsInTalent(Talent.TESTED_HYPOTHESIS)), 1);
ScrollOfRecharging.charge(hero);
}
}
return super.identify();
return this;
}
@Override
@ -344,7 +336,7 @@ public abstract class Scroll extends Item {
Scroll s = (Scroll) ingredients.get(0);
s.quantity(s.quantity() - 1);
s.setKnown();
s.identify();
return Reflection.newInstance(stones.get(s.getClass())).quantity(amnts.get(s.getClass()));
}

View File

@ -85,7 +85,7 @@ public class ScrollOfDivination extends ExoticScroll {
}
probs[0]--;
Potion p = Reflection.newInstance(Random.element(potions));
p.setKnown();
p.identify();
IDed.add(p);
potions.remove(p.getClass());
break;
@ -96,7 +96,7 @@ public class ScrollOfDivination extends ExoticScroll {
}
probs[1]--;
Scroll s = Reflection.newInstance(Random.element(scrolls));
s.setKnown();
s.identify();
IDed.add(s);
scrolls.remove(s.getClass());
break;