v0.8.1a: various bugfixes:

- warlocks not playing debuff sound if hero is already debuffed
- various small logic errors with ring of wealth
- wand of warding incorrectly refusing to place a new ward with 1 energy left
- runes appearing on top of each other in runestone rooms
- particles on item sprites being visible when the sprite isn't
This commit is contained in:
Evan Debenham 2020-07-02 14:46:03 -04:00
parent ea4d45da7f
commit 91b7b14ea4
5 changed files with 13 additions and 11 deletions

View File

@ -105,10 +105,8 @@ public class Warlock extends Mob implements Callback {
if (hit( this, enemy, true )) {
//TODO would be nice for this to work on ghost/statues too
if (enemy == Dungeon.hero && Random.Int( 2 ) == 0) {
if (enemy.buff( Degrade.class ) == null){
Sample.INSTANCE.play( Assets.Sounds.DEBUFF );
}
Buff.prolong( enemy, Degrade.class, Degrade.DURATION );
Sample.INSTANCE.play( Assets.Sounds.DEBUFF );
}
int dmg = Random.NormalIntRange( 12, 18 );

View File

@ -179,11 +179,11 @@ public class RingOfWealth extends Ring {
if (roll < (0.6f - 0.04f * level)) {
latestDropTier = 1;
return genLowValueConsumable();
//30% chance + 2% per level. Starting from +15: 60%-2%*lvl
//30% chance + 2% per level. Starting from +15: 60%-2%*(lvl-15)
} else if (roll < (0.9f - 0.02f * level)) {
latestDropTier = 2;
return genMidValueConsumable();
//10% chance + 2% per level. Starting from +15: 40%+2%*lvl
//10% chance + 2% per level. Starting from +15: 40%+2%*(lvl-15)
} else {
latestDropTier = 3;
return genHighValueConsumable();
@ -227,7 +227,7 @@ public class RingOfWealth extends Ring {
private static Item genHighValueConsumable(){
switch (Random.Int(4)){
case 0: default:
Item i = genLowValueConsumable();
Item i = genMidValueConsumable();
if (i instanceof Bomb){
return new Bomb.DoubleBomb();
} else {
@ -249,13 +249,13 @@ public class RingOfWealth extends Ring {
switch (Random.Int(5)){
default: case 0: case 1:
Weapon w = Generator.randomWeapon(floorset);
if (!w.hasGoodEnchant() && Random.Int(10-level) == 0) w.enchant();
if (!w.hasGoodEnchant() && Random.Int(10) < level) w.enchant();
else if (w.hasCurseEnchant()) w.enchant(null);
result = w;
break;
case 2:
Armor a = Generator.randomArmor(floorset);
if (!a.hasGoodGlyph() && Random.Int(10-level) == 0) a.inscribe();
if (!a.hasGoodGlyph() && Random.Int(10) < level) a.inscribe();
else if (a.hasCurseGlyph()) a.inscribe(null);
result = a;
break;

View File

@ -68,7 +68,7 @@ public class WandOfWarding extends Wand {
return false;
}
} else {
if ((currentWardEnergy + 2) > maxWardEnergy){
if ((currentWardEnergy + 1) > maxWardEnergy){
GLog.w( Messages.get(this, "no_more_wards"));
return false;
}

View File

@ -55,7 +55,7 @@ public class RunestoneRoom extends SpecialRoom {
for (int i = 0; i < n; i++) {
do {
dropPos = level.pointToCell(random());
} while (level.map[dropPos] != Terrain.EMPTY);
} while (level.map[dropPos] != Terrain.EMPTY || level.heaps.get( dropPos ) != null);
level.drop(prize(level), dropPos);
}

View File

@ -307,6 +307,10 @@ public class ItemSprite extends MovieClip {
visible = (heap == null || heap.seen);
if (emitter != null){
emitter.visible = visible;
}
if (dropInterval > 0){
shadowOffset -= speed.y * Game.elapsed * 0.8f;