v0.7.2: bugfixes:

- fixed the mage not being able to fully ID wands
- fixed thrown weapons immediately breaking in rare cases
This commit is contained in:
Evan Debenham 2019-02-20 13:19:49 -05:00
parent b5edad2b2e
commit 4659905b3a
2 changed files with 8 additions and 2 deletions

View File

@ -277,7 +277,7 @@ public abstract class Wand extends Item {
}
protected void wandUsed() {
if (!levelKnown && availableUsesToID >= 1) {
if (!isIdentified() && availableUsesToID >= 1) {
availableUsesToID--;
usesLeftToID--;
if (usesLeftToID <= 0) {

View File

@ -128,7 +128,7 @@ abstract public class MissileWeapon extends Weapon {
return super.upgrade();
}
}
@Override
public ArrayList<String> actions( Hero hero ) {
ArrayList<String> actions = super.actions( hero );
@ -152,6 +152,12 @@ abstract public class MissileWeapon extends Weapon {
}
}
@Override
public void doThrow(Hero hero) {
parent = null; //reset parent before throwing, just incase
super.doThrow(hero);
}
@Override
protected void onThrow( int cell ) {
Char enemy = Actor.findChar( cell );