v2.3.0: added floating text + icons for loads more heal/shield cases
This commit is contained in:
@@ -27,6 +27,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Hunger;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.BlobEmitter;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.FloatingText;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.ShadowParticle;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.ShaftParticle;
|
||||
@@ -37,6 +38,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfHealing;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfRemoveCurse;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.journal.Notes.Landmark;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
||||
import com.watabou.noosa.audio.Sample;
|
||||
|
||||
@@ -55,6 +57,7 @@ public class WaterOfHealth extends WellWater {
|
||||
|
||||
hero.HP = hero.HT;
|
||||
hero.sprite.emitter().start( Speck.factory( Speck.HEALING ), 0.4f, 4 );
|
||||
hero.sprite.showStatusWithIcon(CharSprite.POSITIVE, String.valueOf(hero.HT), FloatingText.HEALING);
|
||||
|
||||
CellEmitter.get( hero.pos ).start( ShaftParticle.FACTORY, 0.2f, 3 );
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.DwarfKing;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.FloatingText;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.BrokenSeal;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfBlastWave;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.mechanics.Ballistica;
|
||||
@@ -390,7 +391,9 @@ public class Combo extends Buff implements ActionIndicator.Action {
|
||||
if (!ch.isAlive()) {
|
||||
if (hero.hasTalent(Talent.LETHAL_DEFENSE) && hero.buff(BrokenSeal.WarriorShield.class) != null) {
|
||||
BrokenSeal.WarriorShield shield = hero.buff(BrokenSeal.WarriorShield.class);
|
||||
shield.supercharge(Math.round(shield.maxShield() * hero.pointsInTalent(Talent.LETHAL_DEFENSE) / 3f));
|
||||
int shieldAmt = Math.round(shield.maxShield() * hero.pointsInTalent(Talent.LETHAL_DEFENSE) / 3f);
|
||||
shield.supercharge(shieldAmt);
|
||||
hero.sprite.showStatusWithIcon(CharSprite.POSITIVE, String.valueOf(shieldAmt), FloatingText.SHIELDING);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -445,7 +448,9 @@ public class Combo extends Buff implements ActionIndicator.Action {
|
||||
if (!enemy.isAlive() || (!wasAlly && enemy.alignment == target.alignment)) {
|
||||
if (hero.hasTalent(Talent.LETHAL_DEFENSE) && hero.buff(BrokenSeal.WarriorShield.class) != null){
|
||||
BrokenSeal.WarriorShield shield = hero.buff(BrokenSeal.WarriorShield.class);
|
||||
shield.supercharge(Math.round(shield.maxShield() * hero.pointsInTalent(Talent.LETHAL_DEFENSE)/3f));
|
||||
int shieldAmt = Math.round(shield.maxShield() * hero.pointsInTalent(Talent.LETHAL_DEFENSE) / 3f);
|
||||
shield.supercharge(shieldAmt);
|
||||
hero.sprite.showStatusWithIcon(CharSprite.POSITIVE, String.valueOf(shieldAmt), FloatingText.SHIELDING);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
package com.shatteredpixel.shatteredpixeldungeon.actors.buffs;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.FloatingText;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
|
||||
|
||||
@@ -37,6 +38,7 @@ public class Corruption extends AllyBuff {
|
||||
//corrupted enemies are usually fully healed and cleansed of most debuffs
|
||||
public static void corruptionHeal(Char target){
|
||||
target.HP = target.HT;
|
||||
target.sprite.showStatusWithIcon(CharSprite.POSITIVE, String.valueOf(target.HT), FloatingText.HEALING);
|
||||
for (Buff buff : target.buffs()) {
|
||||
if (buff.type == Buff.buffType.NEGATIVE
|
||||
&& !(buff instanceof SoulMark)) {
|
||||
|
||||
@@ -23,7 +23,9 @@ package com.shatteredpixel.shatteredpixeldungeon.actors.buffs;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Challenges;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.FloatingText;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
|
||||
import com.watabou.utils.Bundle;
|
||||
|
||||
@@ -44,6 +46,7 @@ public class WellFed extends Buff {
|
||||
return true;
|
||||
} else if (left % 18 == 0){
|
||||
target.HP = Math.min(target.HT, target.HP + 1);
|
||||
target.sprite.showStatusWithIcon(CharSprite.POSITIVE, "1", FloatingText.HEALING);
|
||||
}
|
||||
|
||||
spend(TICK);
|
||||
|
||||
@@ -46,6 +46,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.hero.abilities.ArmorAbili
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.abilities.Ratmogrify;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.FloatingText;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.SpellSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.LeafParticle;
|
||||
@@ -68,6 +69,7 @@ import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
|
||||
import com.watabou.noosa.Image;
|
||||
import com.watabou.noosa.audio.Sample;
|
||||
@@ -463,14 +465,16 @@ public enum Talent {
|
||||
|
||||
public static void onFoodEaten( Hero hero, float foodVal, Item foodSource ){
|
||||
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), 1+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), hero.pointsInTalent(HEARTY_MEAL));
|
||||
//2/3 HP healed, when hero is below 50% health
|
||||
int healing = 1 + hero.pointsInTalent(HEARTY_MEAL);
|
||||
//3/5 HP healed, when hero is below 25% health
|
||||
if (hero.HP <= hero.HT/4) healing = 1 + 2 * hero.pointsInTalent(HEARTY_MEAL);
|
||||
|
||||
hero.HP = Math.min(hero.HP + healing, hero.HT);
|
||||
hero.sprite.emitter().burst(Speck.factory(Speck.HEALING), 1);
|
||||
hero.sprite.showStatusWithIcon(CharSprite.POSITIVE, String.valueOf(healing), FloatingText.HEALING);
|
||||
|
||||
}
|
||||
}
|
||||
if (hero.hasTalent(IRON_STOMACH)){
|
||||
@@ -553,11 +557,13 @@ public enum Talent {
|
||||
if (shield != null) {
|
||||
// 50/75% of total shield
|
||||
int shieldToGive = Math.round(factor * shield.maxShield() * 0.25f * (1 + hero.pointsInTalent(LIQUID_WILLPOWER)));
|
||||
hero.sprite.showStatusWithIcon(CharSprite.POSITIVE, String.valueOf(shieldToGive), FloatingText.SHIELDING);
|
||||
shield.supercharge(shieldToGive);
|
||||
}
|
||||
} else {
|
||||
// 5/7.5% of max HP
|
||||
int shieldToGive = Math.round( factor * hero.HT * (0.025f * (1+hero.pointsInTalent(LIQUID_WILLPOWER))));
|
||||
hero.sprite.showStatusWithIcon(CharSprite.POSITIVE, String.valueOf(shieldToGive), FloatingText.SHIELDING);
|
||||
Buff.affect(hero, Barrier.class).setShield(shieldToGive);
|
||||
}
|
||||
}
|
||||
@@ -665,6 +671,7 @@ public enum Talent {
|
||||
if (hero.sprite != null) {
|
||||
Emitter e = hero.sprite.emitter();
|
||||
if (e != null) e.burst(Speck.factory(Speck.HEALING), hero.pointsInTalent(TEST_SUBJECT));
|
||||
hero.sprite.showStatusWithIcon(CharSprite.POSITIVE, String.valueOf(hero.HP + 1 + hero.pointsInTalent(TEST_SUBJECT)), FloatingText.HEALING);
|
||||
}
|
||||
}
|
||||
if (hero.hasTalent(TESTED_HYPOTHESIS)){
|
||||
|
||||
@@ -36,8 +36,8 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.hero.abilities.ArmorAbili
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.NPC;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.FloatingText;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Dewdrop;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.armor.ClassArmor;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||
@@ -45,9 +45,9 @@ import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.HeroIcon;
|
||||
import com.watabou.utils.BArray;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
||||
import com.watabou.noosa.audio.Sample;
|
||||
import com.watabou.utils.BArray;
|
||||
import com.watabou.utils.Bundle;
|
||||
import com.watabou.utils.PathFinder;
|
||||
|
||||
@@ -270,7 +270,7 @@ public class Challenge extends ArmorAbility {
|
||||
if (hpToHeal > 0){
|
||||
Dungeon.hero.HP += hpToHeal;
|
||||
Dungeon.hero.sprite.emitter().start( Speck.factory( Speck.HEALING ), 0.33f, 6 );
|
||||
Dungeon.hero.sprite.showStatus( CharSprite.POSITIVE, Messages.get(Dewdrop.class, "heal", hpToHeal) );
|
||||
Dungeon.hero.sprite.showStatusWithIcon( CharSprite.POSITIVE, String.valueOf(hpToHeal), FloatingText.HEALING );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -250,7 +250,9 @@ public class ElementalStrike extends ArmorAbility {
|
||||
//*** Blocking ***
|
||||
} else if (ench instanceof Blocking){
|
||||
if (targetsHit > 0){
|
||||
int shield = Math.round(Math.round(6f*targetsHit*powerMulti));
|
||||
Buff.affect(hero, Barrier.class).setShield(Math.round(6f*targetsHit*powerMulti));
|
||||
hero.sprite.showStatusWithIcon(CharSprite.POSITIVE, String.valueOf(shield), FloatingText.SHIELDING);
|
||||
}
|
||||
|
||||
//*** Vampiric ***
|
||||
|
||||
@@ -415,6 +415,7 @@ public class ElementalBlast extends ArmorAbility {
|
||||
charsHit = Math.min(4 + hero.pointsInTalent(Talent.REACTIVE_BARRIER), charsHit);
|
||||
if (charsHit > 0 && hero.hasTalent(Talent.REACTIVE_BARRIER)){
|
||||
int shielding = Math.round(charsHit*2.5f*hero.pointsInTalent(Talent.REACTIVE_BARRIER));
|
||||
hero.sprite.showStatusWithIcon(CharSprite.POSITIVE, String.valueOf(shielding), FloatingText.SHIELDING);
|
||||
Buff.affect(hero, Barrier.class).setShield(shielding);
|
||||
}
|
||||
|
||||
|
||||
@@ -33,8 +33,10 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Terror;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.abilities.ArmorAbility;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.FloatingText;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.armor.ClassArmor;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.HeroIcon;
|
||||
import com.watabou.utils.BArray;
|
||||
@@ -198,6 +200,7 @@ public class DeathMark extends ArmorAbility {
|
||||
target.die(this);
|
||||
int shld = Math.round(initialHP * (0.125f*Dungeon.hero.pointsInTalent(Talent.DEATHLY_DURABILITY)));
|
||||
if (shld > 0 && target.alignment != Char.Alignment.ALLY){
|
||||
Dungeon.hero.sprite.showStatusWithIcon(CharSprite.POSITIVE, String.valueOf(shld), FloatingText.SHIELDING);
|
||||
Buff.affect(Dungeon.hero, Barrier.class).setShield(shld);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,10 +23,12 @@ package com.shatteredpixel.shatteredpixeldungeon.actors.mobs;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.FloatingText;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfHealing;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.BatSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
|
||||
import com.watabou.utils.Random;
|
||||
|
||||
public class Bat extends Mob {
|
||||
@@ -70,6 +72,7 @@ public class Bat extends Mob {
|
||||
if (reg > 0) {
|
||||
HP += reg;
|
||||
sprite.emitter().burst( Speck.factory( Speck.HEALING ), 1 );
|
||||
sprite.showStatusWithIcon(CharSprite.POSITIVE, String.valueOf(reg), FloatingText.HEALING);
|
||||
}
|
||||
|
||||
return damage;
|
||||
|
||||
@@ -28,6 +28,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Cripple;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Doom;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.FloatingText;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.Splash;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
|
||||
@@ -70,6 +71,7 @@ public class CrystalGuardian extends Mob{
|
||||
throwItems();
|
||||
HP = Math.min(HT, HP+5);
|
||||
if (Dungeon.level.heroFOV[pos]) {
|
||||
sprite.showStatusWithIcon(CharSprite.POSITIVE, "5", FloatingText.HEALING);
|
||||
sprite.emitter().burst(Speck.factory(Speck.HEALING), 1);
|
||||
}
|
||||
if (HP == HT){
|
||||
|
||||
@@ -29,10 +29,12 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.AllyBuff;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.ChampionEnemy;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.abilities.duelist.Challenge;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.FloatingText;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.Pushing;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Gold;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.features.Chasm;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.GhoulSprite;
|
||||
import com.watabou.utils.Bundle;
|
||||
import com.watabou.utils.PathFinder;
|
||||
@@ -292,6 +294,7 @@ public class Ghoul extends Mob {
|
||||
Dungeon.level.mobs.add(ghoul);
|
||||
Dungeon.level.occupyCell( ghoul );
|
||||
ghoul.sprite.idle();
|
||||
ghoul.sprite.showStatusWithIcon(CharSprite.POSITIVE, String.valueOf(Math.round(ghoul.HT/10f)), FloatingText.HEALING);
|
||||
super.detach();
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -31,6 +31,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Invisibility;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.LockedFloor;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Ooze;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.FloatingText;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.DriedRose;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.keys.SkeletonKey;
|
||||
@@ -118,6 +119,7 @@ public class Goo extends Mob {
|
||||
|
||||
if (Dungeon.level.heroFOV[pos] ){
|
||||
sprite.emitter().burst( Speck.factory( Speck.HEALING ), healInc );
|
||||
sprite.showStatusWithIcon( CharSprite.POSITIVE, String.valueOf(healInc), FloatingText.HEALING );
|
||||
}
|
||||
if (Dungeon.isChallenged(Challenges.STRONGER_BOSSES) && healInc < 3) {
|
||||
healInc++;
|
||||
|
||||
@@ -30,6 +30,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.AllyBuff;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.ChampionEnemy;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.Beam;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.FloatingText;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.Pushing;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||
@@ -37,6 +38,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfHealing;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfTeleportation;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.NecromancerSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.SkeletonSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
||||
@@ -165,7 +167,10 @@ public class Necromancer extends Mob {
|
||||
}
|
||||
|
||||
mySkeleton.HP = Math.min(mySkeleton.HP + mySkeleton.HT/5, mySkeleton.HT);
|
||||
if (mySkeleton.sprite.visible) mySkeleton.sprite.emitter().burst( Speck.factory( Speck.HEALING ), 1 );
|
||||
if (mySkeleton.sprite.visible) {
|
||||
mySkeleton.sprite.emitter().burst( Speck.factory( Speck.HEALING ), 1 );
|
||||
mySkeleton.sprite.showStatusWithIcon( CharSprite.POSITIVE, Integer.toString( mySkeleton.HT/5 ), FloatingText.HEALING );
|
||||
}
|
||||
|
||||
//otherwise give it adrenaline
|
||||
} else if (mySkeleton.buff(Adrenaline.class) == null) {
|
||||
|
||||
@@ -27,7 +27,9 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.ToxicGas;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Burning;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Cripple;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.FloatingText;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Generator;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.RotLasherSprite;
|
||||
import com.watabou.utils.Random;
|
||||
|
||||
@@ -55,6 +57,7 @@ public class RotLasher extends Mob {
|
||||
protected boolean act() {
|
||||
if (enemy == null || !Dungeon.level.adjacent(pos, enemy.pos)) {
|
||||
HP = Math.min(HT, HP + 5);
|
||||
sprite.showStatusWithIcon(CharSprite.POSITIVE, "5", FloatingText.HEALING);
|
||||
}
|
||||
return super.act();
|
||||
}
|
||||
|
||||
@@ -29,6 +29,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Barrier;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Charm;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Light;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.FloatingText;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Generator;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||
@@ -37,6 +38,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfIdentify;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfTeleportation;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfUpgrade;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.mechanics.Ballistica;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.SuccubusSprite;
|
||||
import com.watabou.noosa.audio.Sample;
|
||||
import com.watabou.utils.Bundle;
|
||||
@@ -79,9 +81,15 @@ public class Succubus extends Mob {
|
||||
int shield = (HP - HT) + (5 + damage);
|
||||
if (shield > 0){
|
||||
HP = HT;
|
||||
if (shield < 5){
|
||||
sprite.showStatusWithIcon(CharSprite.POSITIVE, String.valueOf(5-shield), FloatingText.HEALING);
|
||||
}
|
||||
|
||||
Buff.affect(this, Barrier.class).setShield(shield);
|
||||
sprite.showStatusWithIcon(CharSprite.POSITIVE, String.valueOf(shield), FloatingText.SHIELDING);
|
||||
} else {
|
||||
HP += 5 + damage;
|
||||
sprite.showStatusWithIcon(CharSprite.POSITIVE, "5", FloatingText.HEALING);
|
||||
}
|
||||
if (Dungeon.level.heroFOV[pos]) {
|
||||
sprite.emitter().burst( Speck.factory( Speck.HEALING ), 2 );
|
||||
|
||||
@@ -26,12 +26,14 @@ import com.shatteredpixel.shatteredpixeldungeon.Badges;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.MagicImmune;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.FloatingText;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.ShadowParticle;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfLivingEarth;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.plants.Earthroot;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
||||
@@ -168,6 +170,7 @@ public class ChaliceOfBlood extends Artifact {
|
||||
}
|
||||
if (heal >= 1f) {
|
||||
target.HP = Math.min(target.HT, target.HP + (int)heal);
|
||||
target.sprite.showStatusWithIcon(CharSprite.POSITIVE, String.valueOf(heal), FloatingText.HEALING);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -41,6 +41,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Wraith;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.DirectableAlly;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.Ghost;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.FloatingText;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.ShaftParticle;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||
@@ -58,6 +59,7 @@ import com.shatteredpixel.shatteredpixeldungeon.scenes.AlchemyScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.CellSelector;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.GhostSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||
@@ -311,6 +313,7 @@ public class DriedRose extends Artifact {
|
||||
} else {
|
||||
int heal = Math.round((1 + level()/3f)*amount);
|
||||
ghost.HP = Math.min( ghost.HT, ghost.HP + heal);
|
||||
ghost.sprite.showStatusWithIcon(CharSprite.POSITIVE, String.valueOf(heal), FloatingText.HEALING);
|
||||
updateQuickslot();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,9 +26,11 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Hunger;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Invisibility;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.FloatingText;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfHealing;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
||||
import com.watabou.utils.Random;
|
||||
@@ -66,10 +68,9 @@ public class FrozenCarpaccio extends Food {
|
||||
break;
|
||||
case 3:
|
||||
GLog.i( Messages.get(FrozenCarpaccio.class, "better") );
|
||||
if (hero.HP < hero.HT) {
|
||||
hero.HP = Math.min( hero.HP + hero.HT / 4, hero.HT );
|
||||
hero.sprite.emitter().burst( Speck.factory( Speck.HEALING ), 1 );
|
||||
}
|
||||
hero.HP = Math.min( hero.HP + hero.HT / 4, hero.HT );
|
||||
hero.sprite.emitter().burst( Speck.factory( Speck.HEALING ), 1 );
|
||||
hero.sprite.showStatusWithIcon( CharSprite.POSITIVE, String.valueOf(hero.HT / 4), FloatingText.HEALING );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,9 +26,11 @@ import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.ArtifactRecharge;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Hunger;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.FloatingText;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfRecharging;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.utils.Holiday;
|
||||
import com.watabou.noosa.audio.Sample;
|
||||
@@ -98,6 +100,7 @@ public class Pasty extends Food {
|
||||
int toHeal = Math.max(3, hero.HT/20);
|
||||
hero.HP = Math.min(hero.HP + toHeal, hero.HT);
|
||||
hero.sprite.emitter().burst( Speck.factory( Speck.HEALING ), 1 );
|
||||
hero.sprite.showStatusWithIcon( CharSprite.POSITIVE, String.valueOf(toHeal), FloatingText.HEALING );
|
||||
break;
|
||||
case WINTER_HOLIDAYS:
|
||||
hero.belongings.charge(0.5f); //2 turns worth
|
||||
|
||||
@@ -26,8 +26,10 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Hunger;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Invisibility;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.FloatingText;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfHealing;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||
|
||||
public class PhantomMeat extends Food {
|
||||
@@ -51,10 +53,9 @@ public class PhantomMeat extends Food {
|
||||
|
||||
Barkskin.conditionallyAppend( hero, hero.HT / 4, 1 );
|
||||
Buff.affect( hero, Invisibility.class, Invisibility.DURATION );
|
||||
if (hero.HP < hero.HT) {
|
||||
hero.HP = Math.min( hero.HP + hero.HT / 4, hero.HT );
|
||||
}
|
||||
hero.HP = Math.min( hero.HP + hero.HT / 4, hero.HT );
|
||||
hero.sprite.emitter().burst( Speck.factory( Speck.HEALING ), 1 );
|
||||
hero.sprite.showStatusWithIcon( CharSprite.POSITIVE, String.valueOf(hero.HT / 4), FloatingText.HEALING );
|
||||
PotionOfHealing.cure(hero);
|
||||
|
||||
}
|
||||
|
||||
@@ -25,10 +25,12 @@ import com.shatteredpixel.shatteredpixeldungeon.Challenges;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.FloatingText;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfHealing;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.quest.GooBlob;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
|
||||
import com.watabou.noosa.Image;
|
||||
@@ -84,6 +86,7 @@ public class ElixirOfAquaticRejuvenation extends Elixir {
|
||||
target.HP += healAmt;
|
||||
left -= healAmt;
|
||||
target.sprite.emitter().burst( Speck.factory( Speck.HEALING ), 1 );
|
||||
target.sprite.showStatusWithIcon( CharSprite.POSITIVE, "1", FloatingText.HEALING );
|
||||
}
|
||||
|
||||
if (left <= 0){
|
||||
|
||||
@@ -25,6 +25,8 @@ import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Barrier;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.FloatingText;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||
import com.watabou.noosa.audio.Sample;
|
||||
|
||||
@@ -37,6 +39,7 @@ public class SealShard extends RemainsItem {
|
||||
@Override
|
||||
protected void doEffect(Hero hero) {
|
||||
Buff.affect(hero, Barrier.class).incShield(hero.HT/10);
|
||||
hero.sprite.showStatusWithIcon( CharSprite.POSITIVE, String.valueOf(hero.HT/10), FloatingText.SHIELDING );
|
||||
Sample.INSTANCE.play(Assets.Sounds.UNLOCK);
|
||||
}
|
||||
|
||||
|
||||
@@ -40,6 +40,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroClass;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroSubClass;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.abilities.mage.WildMagic;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.FloatingText;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.MagicMissile;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.TalismanOfForesight;
|
||||
@@ -52,6 +53,7 @@ import com.shatteredpixel.shatteredpixeldungeon.mechanics.Ballistica;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.CellSelector;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.QuickSlotButton;
|
||||
@@ -601,6 +603,7 @@ public abstract class Wand extends Item {
|
||||
float shield = curUser.HT * (0.04f*curWand.curCharges);
|
||||
if (curUser.pointsInTalent(Talent.SHIELD_BATTERY) == 2) shield *= 1.5f;
|
||||
Buff.affect(curUser, Barrier.class).setShield(Math.round(shield));
|
||||
curUser.sprite.showStatusWithIcon(CharSprite.POSITIVE, String.valueOf(shield), FloatingText.SHIELDING);
|
||||
curWand.curCharges = 0;
|
||||
curUser.sprite.operate(curUser.pos);
|
||||
Sample.INSTANCE.play(Assets.Sounds.CHARGEUP);
|
||||
@@ -634,7 +637,9 @@ public abstract class Wand extends Item {
|
||||
//regular. If hero owns wand but it isn't in belongings it must be in the staff
|
||||
if (curUser.heroClass == HeroClass.MAGE && !curUser.belongings.contains(curWand)){
|
||||
//grants 3/5 shielding
|
||||
Buff.affect(Dungeon.hero, Barrier.class).setShield(1 + 2 * Dungeon.hero.pointsInTalent(Talent.BACKUP_BARRIER));
|
||||
int shieldToGive = 1 + 2 * Dungeon.hero.pointsInTalent(Talent.BACKUP_BARRIER);
|
||||
Buff.affect(Dungeon.hero, Barrier.class).setShield(shieldToGive);
|
||||
Dungeon.hero.sprite.showStatusWithIcon(CharSprite.POSITIVE, String.valueOf(shieldToGive), FloatingText.SHIELDING);
|
||||
|
||||
//metamorphed. Triggers if wand is highest level hero has
|
||||
} else if (curUser.heroClass != HeroClass.MAGE) {
|
||||
@@ -646,7 +651,9 @@ public abstract class Wand extends Item {
|
||||
}
|
||||
if (highest){
|
||||
//grants 3/5 shielding
|
||||
Buff.affect(Dungeon.hero, Barrier.class).setShield(1 + 2 * Dungeon.hero.pointsInTalent(Talent.BACKUP_BARRIER));
|
||||
int shieldToGive = 1 + 2 * Dungeon.hero.pointsInTalent(Talent.BACKUP_BARRIER);
|
||||
Buff.affect(Dungeon.hero, Barrier.class).setShield(shieldToGive);
|
||||
Dungeon.hero.sprite.showStatusWithIcon(CharSprite.POSITIVE, String.valueOf(shieldToGive), FloatingText.SHIELDING);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,11 +33,13 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mimic;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.NPC;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.FloatingText;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.MagicMissile;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.MagesStaff;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.mechanics.Ballistica;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.EarthGuardianSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
|
||||
@@ -329,6 +331,9 @@ public class WandOfLivingEarth extends DamageWand {
|
||||
this.wandLevel = wandLevel;
|
||||
HT = 16 + 8 * wandLevel;
|
||||
}
|
||||
if (HP != 0){
|
||||
sprite.showStatusWithIcon(CharSprite.POSITIVE, String.valueOf(healthToAdd), FloatingText.HEALING);
|
||||
}
|
||||
HP = Math.min(HT, HP + healthToAdd);
|
||||
//half of hero's evasion
|
||||
defenseSkill = (hero.lvl + 4)/2;
|
||||
|
||||
@@ -25,6 +25,7 @@ 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.ShieldBuff;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.FloatingText;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.Weapon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
@@ -51,7 +52,9 @@ public class Blocking extends Weapon.Enchantment {
|
||||
float powerMulti = Math.max(1f, procChance);
|
||||
|
||||
BlockBuff b = Buff.affect(attacker, BlockBuff.class);
|
||||
b.setShield(Math.round(powerMulti * (2 + weapon.buffedLvl())));
|
||||
int shield = Math.round(powerMulti * (2 + weapon.buffedLvl()));
|
||||
b.setShield(shield);
|
||||
attacker.sprite.showStatusWithIcon(CharSprite.POSITIVE, String.valueOf(shield), FloatingText.SHIELDING);
|
||||
attacker.sprite.emitter().burst(Speck.factory(Speck.LIGHT), 5);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,6 +35,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroClass;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroSubClass;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.FloatingText;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.KindOfWeapon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.Weapon;
|
||||
@@ -42,6 +43,7 @@ import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.CellSelector;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.ActionIndicator;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.AttackIndicator;
|
||||
@@ -215,6 +217,7 @@ public class MeleeWeapon extends Weapon {
|
||||
&& hero.hasTalent(Talent.AGGRESSIVE_BARRIER)
|
||||
&& (hero.HP / (float)hero.HT) < 0.20f*(1+hero.pointsInTalent(Talent.AGGRESSIVE_BARRIER))){
|
||||
Buff.affect(hero, Barrier.class).setShield(3);
|
||||
hero.sprite.showStatusWithIcon(CharSprite.POSITIVE, "3", FloatingText.SHIELDING);
|
||||
}
|
||||
|
||||
if (hero.buff(Talent.CombinedLethalityAbilityTracker.class) != null
|
||||
|
||||
Reference in New Issue
Block a user