v0.7.1c: Fixed:
- Dwarf King not being able to summon if he could not see an enemy - recycle generating health potions when it shouldn't - soul mark being substantially more common than intended - rare cases where DM-300 could fail to spawn due to too small a level - magical porter rarely causing soft-locks - thrown weapons not having their level IDed from remains
This commit is contained in:
parent
f3705520ed
commit
e70c5bbb41
|
@ -172,7 +172,8 @@ public class Bones {
|
|||
if (item.level() > 3) {
|
||||
item.degrade( item.level() - 3 );
|
||||
}
|
||||
item.levelKnown = false;
|
||||
//thrown weapons are always IDed, otherwise set unknown
|
||||
item.levelKnown = !(item instanceof MissileWeapon);
|
||||
}
|
||||
|
||||
item.reset();
|
||||
|
|
|
@ -108,13 +108,6 @@ public class King extends Mob {
|
|||
super.getCloser( target );
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean canAttack( Char enemy ) {
|
||||
return canTryToSummon() ?
|
||||
pos == ((CityBossLevel)Dungeon.level).pedestal( nextPedestal ) :
|
||||
Dungeon.level.adjacent( pos, enemy.pos );
|
||||
}
|
||||
|
||||
private boolean canTryToSummon() {
|
||||
if (Undead.count < maxArmySize()) {
|
||||
Char ch = Actor.findChar( ((CityBossLevel)Dungeon.level).pedestal( nextPedestal ) );
|
||||
|
@ -125,15 +118,15 @@ public class King extends Mob {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean attack( Char enemy ) {
|
||||
protected boolean act() {
|
||||
if (canTryToSummon() && pos == ((CityBossLevel)Dungeon.level).pedestal( nextPedestal )) {
|
||||
summon();
|
||||
return true;
|
||||
} else {
|
||||
if (Actor.findChar( ((CityBossLevel)Dungeon.level).pedestal( nextPedestal ) ) == enemy) {
|
||||
if (enemy != null && Actor.findChar( ((CityBossLevel)Dungeon.level).pedestal( nextPedestal ) ) == enemy) {
|
||||
nextPedestal = !nextPedestal;
|
||||
}
|
||||
return super.attack(enemy);
|
||||
return super.act();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -218,6 +211,7 @@ public class King extends Mob {
|
|||
}
|
||||
|
||||
yell( Messages.get(this, "arise") );
|
||||
spend( TICK );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
|
||||
package com.shatteredpixel.shatteredpixeldungeon.items.spells;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Challenges;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Generator;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||
|
@ -75,7 +76,7 @@ public class Recycle extends InventorySpell {
|
|||
} else {
|
||||
result = Generator.random(Generator.Category.STONE);
|
||||
}
|
||||
} while (result.getClass() == item.getClass());
|
||||
} while (result.getClass() == item.getClass() || Challenges.isItemBlocked(result));
|
||||
|
||||
item.detach(curUser.belongings.backpack);
|
||||
GLog.p(Messages.get(this, "recycled", result.name()));
|
||||
|
|
|
@ -146,7 +146,7 @@ public abstract class Wand extends Item {
|
|||
if (target != Dungeon.hero &&
|
||||
Dungeon.hero.subClass == HeroSubClass.WARLOCK &&
|
||||
//standard 1 - 0.92^x chance, plus 7%. Starts at 15%
|
||||
Random.Float() > (Math.pow(0.92f, (level()*chargesUsed)+1) - 0.7f)){
|
||||
Random.Float() > (Math.pow(0.92f, (level()*chargesUsed)+1) - 0.07f)){
|
||||
SoulMark.prolong(target, SoulMark.class, SoulMark.DURATION + level());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -106,10 +106,10 @@ public class CavesBossLevel extends Level {
|
|||
Rect space = new Rect();
|
||||
|
||||
space.set(
|
||||
Random.IntRange(2, 2 + (int)(width*0.2f)),
|
||||
Random.IntRange(2, 2 + (int)(height*0.2f)),
|
||||
Random.IntRange((int)(width * 0.8f - 2), width-2 ),
|
||||
Random.IntRange((int)(height * 0.8f - 2), height-2 )
|
||||
Random.IntRange(2, 6),
|
||||
Random.IntRange(2, 6),
|
||||
Random.IntRange(width-6, width-2),
|
||||
Random.IntRange(height-6, height-2)
|
||||
);
|
||||
|
||||
Painter.fillEllipse( this, space, Terrain.EMPTY );
|
||||
|
|
|
@ -396,9 +396,12 @@ public class GameScene extends PixelScene {
|
|||
//TODO currently items are only ported to boss rooms, so this works well
|
||||
//might want to have a 'near entrance' function if items can be ported elsewhere
|
||||
int pos;
|
||||
//try to find a tile with no heap, otherwise just stick items onto a heap.
|
||||
int tries = 100;
|
||||
do {
|
||||
pos = Dungeon.level.randomRespawnCell();
|
||||
} while (Dungeon.level.heaps.get(pos) != null);
|
||||
tries--;
|
||||
} while (tries > 0 && Dungeon.level.heaps.get(pos) != null);
|
||||
for (Item item : ported) {
|
||||
Dungeon.level.drop( item, pos ).type = Heap.Type.CHEST;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user