v0.7.2b: bugfixes:

- fixed horn of plenty sprite not updating when rapidly charging
- fixed dried rose rarely being usable when ghost quest is incomplete
- fixed cloak of shadows not being able to be turned off with 0 charges
- fixed corrupted thieves stealing from the player
This commit is contained in:
Evan Debenham 2019-03-30 15:50:22 -04:00
parent b2409522d9
commit f7405c0a31
4 changed files with 13 additions and 4 deletions

View File

@ -116,7 +116,8 @@ public class Thief extends Mob {
public int attackProc( Char enemy, int damage ) { public int attackProc( Char enemy, int damage ) {
damage = super.attackProc( enemy, damage ); damage = super.attackProc( enemy, damage );
if (item == null && enemy instanceof Hero && steal( (Hero)enemy )) { if (alignment == Alignment.ENEMY && item == null
&& enemy instanceof Hero && steal( (Hero)enemy )) {
state = FLEEING; state = FLEEING;
} }

View File

@ -66,7 +66,7 @@ public class CloakOfShadows extends Artifact {
@Override @Override
public ArrayList<String> actions( Hero hero ) { public ArrayList<String> actions( Hero hero ) {
ArrayList<String> actions = super.actions( hero ); ArrayList<String> actions = super.actions( hero );
if (isEquipped( hero ) && !cursed && charge > 0) if (isEquipped( hero ) && !cursed && (charge > 0 || stealthed))
actions.add(AC_STEALTH); actions.add(AC_STEALTH);
return actions; return actions;
} }

View File

@ -61,6 +61,7 @@ import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
import com.shatteredpixel.shatteredpixeldungeon.windows.IconTitle; import com.shatteredpixel.shatteredpixeldungeon.windows.IconTitle;
import com.shatteredpixel.shatteredpixeldungeon.windows.WndBag; import com.shatteredpixel.shatteredpixeldungeon.windows.WndBag;
import com.shatteredpixel.shatteredpixeldungeon.windows.WndBlacksmith; import com.shatteredpixel.shatteredpixeldungeon.windows.WndBlacksmith;
import com.shatteredpixel.shatteredpixeldungeon.windows.WndItem;
import com.shatteredpixel.shatteredpixeldungeon.windows.WndQuest; import com.shatteredpixel.shatteredpixeldungeon.windows.WndQuest;
import com.watabou.noosa.audio.Sample; import com.watabou.noosa.audio.Sample;
import com.watabou.utils.Bundle; import com.watabou.utils.Bundle;
@ -120,7 +121,8 @@ public class DriedRose extends Artifact {
if (action.equals(AC_SUMMON)) { if (action.equals(AC_SUMMON)) {
if (ghost != null) GLog.i( Messages.get(this, "spawned") ); if (!Ghost.Quest.completed()) GameScene.show(new WndItem(null, this, true));
else if (ghost != null) GLog.i( Messages.get(this, "spawned") );
else if (!isEquipped( hero )) GLog.i( Messages.get(Artifact.class, "need_to_equip") ); else if (!isEquipped( hero )) GLog.i( Messages.get(Artifact.class, "need_to_equip") );
else if (charge != chargeCap) GLog.i( Messages.get(this, "no_charge") ); else if (charge != chargeCap) GLog.i( Messages.get(this, "no_charge") );
else if (cursed) GLog.i( Messages.get(this, "cursed") ); else if (cursed) GLog.i( Messages.get(this, "cursed") );

View File

@ -131,11 +131,17 @@ public class HornOfPlenty extends Artifact {
if (partialCharge >= 1){ if (partialCharge >= 1){
partialCharge--; partialCharge--;
charge++; charge++;
updateQuickslot();
if (charge == chargeCap){ if (charge == chargeCap){
GLog.p( Messages.get(HornOfPlenty.class, "full") ); GLog.p( Messages.get(HornOfPlenty.class, "full") );
partialCharge = 0; partialCharge = 0;
} }
if (charge >= 15) image = ItemSpriteSheet.ARTIFACT_HORN4;
else if (charge >= 10) image = ItemSpriteSheet.ARTIFACT_HORN3;
else if (charge >= 5) image = ItemSpriteSheet.ARTIFACT_HORN2;
updateQuickslot();
} }
} }
} }