v0.7.1b: bugfixes:
- fixed prison guards not correctly incrementing their potion drop count - added safety checks to high grass and spirit bow
This commit is contained in:
parent
4737fb60b0
commit
f4dbb59365
|
@ -139,7 +139,7 @@ public class Guard extends Mob {
|
|||
//with 0 potions dropped that simplifies to 1/8
|
||||
} else {
|
||||
if (Random.Float() < ((6f - Dungeon.LimitedDrops.GUARD_HP.count) / 6f)){
|
||||
Dungeon.LimitedDrops.GUARD_HP.drop();
|
||||
Dungeon.LimitedDrops.GUARD_HP.count++;
|
||||
return new PotionOfHealing();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -518,6 +518,7 @@ public class Item implements Bundlable {
|
|||
new Callback() {
|
||||
@Override
|
||||
public void call() {
|
||||
curUser = user;
|
||||
Item.this.detach(user.belongings.backpack).onThrow(cell);
|
||||
user.spendAndNext(delay);
|
||||
}
|
||||
|
@ -530,6 +531,7 @@ public class Item implements Bundlable {
|
|||
new Callback() {
|
||||
@Override
|
||||
public void call() {
|
||||
curUser = user;
|
||||
Item.this.detach(user.belongings.backpack).onThrow(cell);
|
||||
user.spendAndNext(delay);
|
||||
}
|
||||
|
|
|
@ -68,9 +68,15 @@ public class SpiritBow extends Weapon {
|
|||
|
||||
@Override
|
||||
public void execute(Hero hero, String action) {
|
||||
|
||||
super.execute(hero, action);
|
||||
|
||||
if (action.equals(AC_SHOOT)) {
|
||||
|
||||
curUser = hero;
|
||||
curItem = this;
|
||||
GameScene.selectCell( shooter );
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -293,7 +299,10 @@ public class SpiritBow extends Weapon {
|
|||
new Callback() {
|
||||
@Override
|
||||
public void call() {
|
||||
if (enemy.isAlive()) onThrow(cell);
|
||||
if (enemy.isAlive()) {
|
||||
curUser = user;
|
||||
onThrow(cell);
|
||||
}
|
||||
|
||||
if (last) {
|
||||
user.spendAndNext(castDelay(user, dst));
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
package com.shatteredpixel.shatteredpixeldungeon.levels.features;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||
|
@ -103,9 +104,11 @@ public class HighGrass {
|
|||
|
||||
freezeTrample = false;
|
||||
|
||||
GameScene.updateMap( pos );
|
||||
|
||||
CellEmitter.get( pos ).burst( LeafParticle.LEVEL_SPECIFIC, 4 );
|
||||
if (Dungeon.level.heroFOV[pos]) Dungeon.observe();
|
||||
if (ShatteredPixelDungeon.scene() instanceof GameScene) {
|
||||
GameScene.updateMap(pos);
|
||||
|
||||
CellEmitter.get(pos).burst(LeafParticle.LEVEL_SPECIFIC, 4);
|
||||
if (Dungeon.level.heroFOV[pos]) Dungeon.observe();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user