From 7266415984c90a869836abfa16f4b65a1ba2701c Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Wed, 26 Feb 2020 20:56:24 -0500 Subject: [PATCH] v0.8.0: text adjustments: - added a hint to snakes if the player misses them many times - fixed a typo in DM-300 description - changed ghouls back to have regular 'defeated' text - fixed a hanging newline in dried rose description when it is known to be uncursed --- .../actors/mobs/Ghoul.java | 3 +-- .../actors/mobs/Snake.java | 16 +++++++++++++- .../items/artifacts/DriedRose.java | 21 +++++++++++-------- .../messages/actors/actors.properties | 4 ++-- 4 files changed, 30 insertions(+), 14 deletions(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Ghoul.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Ghoul.java index e91bfe1fa..c81a4090c 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Ghoul.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Ghoul.java @@ -151,8 +151,6 @@ public class Ghoul extends Mob { timesDowned++; Buff.append(nearby, GhoulLifeLink.class).set(timesDowned*5, this); ((GhoulSprite)sprite).crumple(); - HP = Math.round(HT/10f); - GLog.i(Messages.get(this, "collapse")); beingLifeLinked = false; return; } @@ -282,6 +280,7 @@ public class Ghoul extends Mob { turnsToRevive--; if (turnsToRevive <= 0){ + ghoul.HP = Math.round(ghoul.HT/10f); if (Actor.findChar( ghoul.pos ) != null) { ArrayList candidates = new ArrayList<>(); for (int n : PathFinder.NEIGHBOURS8) { diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Snake.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Snake.java index 6b31125f3..fbcccad78 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Snake.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Snake.java @@ -21,9 +21,12 @@ package com.shatteredpixel.shatteredpixeldungeon.actors.mobs; +import com.shatteredpixel.shatteredpixeldungeon.Badges; import com.shatteredpixel.shatteredpixeldungeon.actors.Char; import com.shatteredpixel.shatteredpixeldungeon.items.Generator; +import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.sprites.SnakeSprite; +import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; import com.watabou.utils.Random; public class Snake extends Mob { @@ -50,5 +53,16 @@ public class Snake extends Mob { public int attackSkill( Char target ) { return 10; } - + + private static int dodges = 0; + + @Override + public String defenseVerb() { + dodges++; + if (dodges >= 5 && !Badges.isUnlocked(Badges.Badge.BOSS_SLAIN_1)){ + GLog.w(Messages.get(this, "hint")); + dodges = 0; + } + return super.defenseVerb(); + } } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/DriedRose.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/DriedRose.java index 471018f08..f8a079157 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/DriedRose.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/DriedRose.java @@ -211,18 +211,21 @@ public class DriedRose extends Artifact { if (level() < levelCap) desc+= "\n\n" + Messages.get(this, "desc_hint"); - } else + } else { desc += "\n\n" + Messages.get(this, "desc_cursed"); - } - - desc += "\n"; - - if (weapon != null){ - desc += "\n" + Messages.get(this, "desc_weapon", weapon.toString()); + } } - if (armor != null){ - desc += "\n" + Messages.get(this, "desc_armor", armor.toString()); + if (weapon != null || armor != null) { + desc += "\n"; + + if (weapon != null) { + desc += "\n" + Messages.get(this, "desc_weapon", weapon.toString()); + } + + if (armor != null) { + desc += "\n" + Messages.get(this, "desc_armor", armor.toString()); + } } return desc; diff --git a/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/actors/actors.properties b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/actors/actors.properties index 9fd29b70b..3459901f2 100644 --- a/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/actors/actors.properties +++ b/core/src/main/resources/com/shatteredpixel/shatteredpixeldungeon/messages/actors/actors.properties @@ -513,7 +513,7 @@ actors.mobs.newdm300.rankings_desc=Crushed by the DM-300 actors.mobs.newdm300.immune=IMMUNE actors.mobs.newdm300.def_verb=blocked actors.mobs.newdm300.defeated=CRITICAL DAMAGE! ATTEMPTING SHUTDO- -actors.mobs.newdm300.desc=The DM-300 is the largest and most powerful 'defense machine' that the dwarves ever built. Such an awesome machine is difficult to manufacture, so the dwarves only ever made a few to guard the entrances to their their underground metropolis.\n\nIt is equipped with vents to jet its toxic exhaust fumes and a high power drill that it can use both to attack and disrupt the earth. DM-300 can also connect to an energy grid, further enhancing its power. +actors.mobs.newdm300.desc=The DM-300 is the largest and most powerful 'defense machine' that the dwarves ever built. Such an awesome machine is difficult to manufacture, so the dwarves only ever made a few to guard the entrances to their underground metropolis.\n\nIt is equipped with vents to jet its toxic exhaust fumes and a high power drill that it can use both to attack and disrupt the earth. DM-300 can also connect to an energy grid, further enhancing its power. actors.mobs.newdm300.desc_supercharged=DM-300 is currently charged full of electrical energy, In this form DM-300 cannot be damaged and moves at double speed! Additionally, its drill now spins fast enough for it to _tunnel through solid rock,_ though it moves much more slowly when doing this.\n\nAttacking DM-300 directly is pointless while it is supercharged, but _something in the area must be providing it with this energy,_ destroying that may weaken it. actors.mobs.newdm300$fallingrocks.desc=Loose rocks are tumbling down from the ceiling here, it looks like its about to collapse! @@ -551,7 +551,6 @@ actors.mobs.fetidrat.name=fetid rat actors.mobs.fetidrat.desc=Something is clearly wrong with this rat. Its greasy black fur and rotting skin are very different from the healthy rats you've seen previously. Its pale green eyes make it seem especially menacing.\n\nThe rat carries a cloud of horrible stench with it, it's overpoweringly strong up close.\n\nDark ooze dribbles from the rat's mouth, it eats through the floor but seems to dissolve in water. actors.mobs.ghoul.name=dwarven ghoul -actors.mobs.ghoul.collapse=The dwarven ghoul collapses. actors.mobs.ghoul.desc=As dwarven society slowly began to collapse, and the current king of the dwarves seized absolute power, those who were weak or who resisted him were not treated well. As the king grew more adept at wielding dark magic, he bent these dwarves to his will, and now they make up the footsoldiers of his army.\n\nGhouls are not especially strong on their own, but always travel in groups and are much harder to kill in large numbers. _When a ghoul is defeated, it will rise again after a few turns as long as another ghoul is nearby._ actors.mobs.gnoll.name=gnoll scout @@ -668,6 +667,7 @@ actors.mobs.slime.def_verb=blocked actors.mobs.slime.desc=Slimes are strange, slightly magical creatures with a rubbery outer body and a liquid core. The city sewers provide them with an ample supply of water and nutrients.\n\nBecause of their elastic outer membrane, it is difficult to deal more than _6 damage_ to slimes from any one attack. actors.mobs.snake.name=sewer snake +actors.mobs.snake.hint=Try using the examine button on a snake to learn how to counter them. actors.mobs.snake.desc=These oversized serpents are capable of quickly slithering around blows, making them quite hard to hit. Magical attacks or surprise attacks are capable of catching them off-guard however.\n\nYou can perform a surprise attack by attacking while out of the snake's vision. One way is to let a snake chase you through a doorway and then _strike just as it moves into the door._ actors.mobs.spinner.name=cave spinner