v0.7.4: fixed allies in the surface scene not working with mage's staff

This commit is contained in:
Evan Debenham 2019-07-16 14:19:33 -04:00
parent fb34d976e8
commit 8e39728069

View File

@ -28,6 +28,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroClass;
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.DriedRose;
import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfLivingEarth;
import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfWarding;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.MagesStaff;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
import com.shatteredpixel.shatteredpixeldungeon.sprites.EarthGuardianSprite;
@ -167,6 +168,15 @@ public class SurfaceScene extends PixelScene {
int earthLevel = Dungeon.hero.belongings.getItem(WandOfLivingEarth.class) == null ? 0 : Dungeon.hero.belongings.getItem(WandOfLivingEarth.class).level();
int wardLevel = Dungeon.hero.belongings.getItem(WandOfWarding.class) == null ? 0 : Dungeon.hero.belongings.getItem(WandOfWarding.class).level();
MagesStaff staff = Dungeon.hero.belongings.getItem(MagesStaff.class);
if (staff != null){
if (staff.wandClass() == WandOfLivingEarth.class){
earthLevel = Math.max(earthLevel, staff.level());
} else if (staff.wandClass() == WandOfWarding.class){
wardLevel = Math.max(wardLevel, staff.level());
}
}
if (roseLevel >= 3 && roseLevel >= earthLevel && roseLevel >= wardLevel){
allySprite = new GhostSprite();
if (dayTime) allySprite.alpha(0.4f);