v0.7.1: bugfixes:

- fixed spirit bow not working with ring of sharpshooting
- fixed curse infusion not cursing spirit bow
- removed boomerang from the catalog
- fixed missile weapons being cursable in various situations
This commit is contained in:
Evan Debenham 2018-12-07 16:30:31 -05:00
parent 54d8adf7ac
commit e1bfd1bbbc
6 changed files with 21 additions and 16 deletions

View File

@ -26,6 +26,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.Generator;
import com.shatteredpixel.shatteredpixeldungeon.items.Gold;
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.Artifact;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles.MissileWeapon;
import com.watabou.utils.Bundle;
import com.watabou.utils.FileUtils;
import com.watabou.utils.Random;
@ -159,9 +160,11 @@ public class Bones {
}
}
if (item.isUpgradable()) {
if (item.isUpgradable() && !(item instanceof MissileWeapon)) {
item.cursed = true;
item.cursedKnown = true;
}
if (item.isUpgradable()) {
//caps at +3
if (item.level() > 3) {
@ -169,7 +172,6 @@ public class Bones {
}
item.levelKnown = false;
}
}
item.reset();

View File

@ -28,9 +28,9 @@ import com.shatteredpixel.shatteredpixeldungeon.items.Item;
import com.shatteredpixel.shatteredpixeldungeon.items.armor.Armor;
import com.shatteredpixel.shatteredpixeldungeon.items.quest.MetalShard;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfRemoveCurse;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.SpiritBow;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.Weapon;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.MeleeWeapon;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles.Boomerang;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
import com.shatteredpixel.shatteredpixeldungeon.windows.WndBag;
import com.watabou.noosa.audio.Sample;
@ -49,7 +49,7 @@ public class CurseInfusion extends InventorySpell {
Sample.INSTANCE.play(Assets.SND_CURSED);
item.cursed = true;
if (item instanceof MeleeWeapon || item instanceof Boomerang) {
if (item instanceof MeleeWeapon || item instanceof SpiritBow) {
Weapon w = (Weapon) item;
Class<? extends Weapon.Enchantment> curr = null;
if (w.enchantment != null) {

View File

@ -28,6 +28,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
import com.shatteredpixel.shatteredpixeldungeon.effects.Splash;
import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfFuror;
import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfSharpshooting;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles.MissileWeapon;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.scenes.CellSelector;
@ -125,12 +126,12 @@ public class SpiritBow extends Weapon {
@Override
public int min(int lvl) {
return 1 + Dungeon.hero.lvl/6;
return 1 + Dungeon.hero.lvl/6 + RingOfSharpshooting.levelDamageBonus(Dungeon.hero);
}
@Override
public int max(int lvl) {
return 6 + Dungeon.hero.lvl/3;
return 6 + Dungeon.hero.lvl/3 + 2*RingOfSharpshooting.levelDamageBonus(Dungeon.hero);
}
private int targetPos;
@ -264,6 +265,8 @@ public class SpiritBow extends Weapon {
if (enemy == null){
user.spendAndNext(castDelay(user, dst));
sniperSpecial = false;
flurryCount = -1;
return;
}
QuickSlotButton.target(enemy);

View File

@ -116,7 +116,6 @@ import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.Sword;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.WarHammer;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.Whip;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.WornShortsword;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles.Boomerang;
import com.watabou.utils.Bundle;
import java.util.ArrayList;
@ -155,7 +154,7 @@ public enum Catalog {
WEAPONS.seen.put( Knuckles.class, false);
WEAPONS.seen.put( Dagger.class, false);
WEAPONS.seen.put( MagesStaff.class, false);
WEAPONS.seen.put( Boomerang.class, false);
//WEAPONS.seen.put( Boomerang.class, false);
WEAPONS.seen.put( Shortsword.class, false);
WEAPONS.seen.put( HandAxe.class, false);
WEAPONS.seen.put( Spear.class, false);

View File

@ -34,6 +34,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.KindofMisc;
import com.shatteredpixel.shatteredpixeldungeon.items.armor.Armor;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.Weapon;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles.Boomerang;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles.MissileWeapon;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
import com.watabou.noosa.audio.Sample;
@ -59,7 +60,7 @@ public class CursingTrap extends Trap {
Heap heap = Dungeon.level.heaps.get( pos );
if (heap != null){
for (Item item : heap.items){
if (item.isUpgradable())
if (item.isUpgradable() && !(item instanceof MissileWeapon))
curse(item);
}
}

View File

@ -390,7 +390,7 @@ public class WndBag extends WndTabbed {
mode == Mode.UPGRADEABLE && item.isUpgradable() ||
mode == Mode.UNIDENTIFED && !item.isIdentified() ||
mode == Mode.UNCURSABLE && ScrollOfRemoveCurse.uncursable(item) ||
mode == Mode.CURSABLE && ((item instanceof EquipableItem && !(item instanceof MissileWeapon)) || item instanceof Boomerang || item instanceof Wand) ||
mode == Mode.CURSABLE && ((item instanceof EquipableItem && !(item instanceof MissileWeapon)) || item instanceof Wand) ||
mode == Mode.QUICKSLOT && (item.defaultAction != null) ||
mode == Mode.WEAPON && (item instanceof MeleeWeapon || item instanceof Boomerang) ||
mode == Mode.ARMOR && (item instanceof Armor) ||