From 42f8aa77d28d01b81ef2273f196959fbcf5d0622 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Sat, 9 May 2020 19:36:34 -0400 Subject: [PATCH] v0.8.1: fixed minor errors with Yog Fight: - invulnerability warning message not showing up when it should - fixed typos with the burning fist --- .../assets/messages/actors/actors.properties | 2 +- .../actors/mobs/YogFist.java | 17 +++++------------ 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/core/src/main/assets/messages/actors/actors.properties b/core/src/main/assets/messages/actors/actors.properties index 1be9f4541..bbe83d0d6 100644 --- a/core/src/main/assets/messages/actors/actors.properties +++ b/core/src/main/assets/messages/actors/actors.properties @@ -766,7 +766,7 @@ actors.mobs.yogfist.invuln_warn=The fist is invulnerable while near to the eye! actors.mobs.yogfist.rankings_desc=Devoured by Yog-Dzewa actors.mobs.yogfist.desc=This fist is an aspect of Yog-Dzewa's power. Fists are linked to the power of Yog-Dzewa, and will be protected from all damage when they are close to the eye. actors.mobs.yogfist$burningfist.name=burning fist -actors.mobs.yogfist$burningfist.desc=This fist is formed out of chaotic fiery magic. As it moves it will constantly set terrain around it ablaze. It is also capable of shooting blasts of fiery power, which spread flames where the impact.\n\nThe fist's ability to spread flames is suppressed when near water, but it's heat is so great that any water around it will evaporate after a short while! +actors.mobs.yogfist$burningfist.desc=This fist is formed out of chaotic fiery magic. As it moves it will constantly set terrain around it ablaze. It is also capable of shooting blasts of fiery power, which spread flames where they impact.\n\nThe fist's ability to spread flames is suppressed when near water, but its heat is so great that any water around it will evaporate after a short while! actors.mobs.yogfist$soiledfist.name=soiled fist actors.mobs.yogfist$soiledfist.desc=This fist is formed out of chaotic earthen magic. As it moves it will constantly cause vegetation to sprout around it. It can also shoot concentrated earthen blasts that will ensnare its target in rapidly growing vines and roots!\n\nThe fist derives power from this plant life, and will resist damage based on the amount of tall or furrowed vegetation near it! actors.mobs.yogfist$rottingfist.name=rotting fist diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/YogFist.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/YogFist.java index 1717d5f9a..6f0399977 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/YogFist.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/YogFist.java @@ -92,7 +92,7 @@ public abstract class YogFist extends Mob { } } - boolean invulnWarned = false; + private boolean invulnWarned = false; protected boolean isNearYog(){ int yogPos = Dungeon.level.exit + 3*Dungeon.level.width(); @@ -101,18 +101,11 @@ public abstract class YogFist extends Mob { @Override public boolean isInvulnerable(Class effect) { - return isNearYog(); - } - - @Override - public void damage(int dmg, Object src) { - if (isInvulnerable(src.getClass())){ - if (!invulnWarned){ - invulnWarned = true; - GLog.w(Messages.get(this, "invuln_warn")); - } + if (isNearYog() && !invulnWarned){ + invulnWarned = true; + GLog.w(Messages.get(this, "invuln_warn")); } - super.damage(dmg, src); + return isNearYog(); } @Override