v0.9.2: fixed evil eye's drops not working correctly
This commit is contained in:
parent
0131feb0b9
commit
a6838ace3c
|
@ -38,6 +38,7 @@ import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.EyeSprite;
|
import com.shatteredpixel.shatteredpixeldungeon.sprites.EyeSprite;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
||||||
import com.watabou.utils.Bundle;
|
import com.watabou.utils.Bundle;
|
||||||
|
import com.watabou.utils.PathFinder;
|
||||||
import com.watabou.utils.Random;
|
import com.watabou.utils.Random;
|
||||||
|
|
||||||
public class Eye extends Mob {
|
public class Eye extends Mob {
|
||||||
|
@ -205,12 +206,17 @@ public class Eye extends Mob {
|
||||||
Item loot;
|
Item loot;
|
||||||
switch(Random.Int(4)){
|
switch(Random.Int(4)){
|
||||||
case 0: case 1: default:
|
case 0: case 1: default:
|
||||||
loot = new Dewdrop().quantity(2);
|
loot = new Dewdrop();
|
||||||
|
int ofs;
|
||||||
|
do {
|
||||||
|
ofs = PathFinder.NEIGHBOURS8[Random.Int(8)];
|
||||||
|
} while (Dungeon.level.solid[pos + ofs] && !Dungeon.level.passable[pos + ofs]);
|
||||||
|
Dungeon.level.drop( new Dewdrop(), pos + ofs ).sprite.drop( pos );
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 2:
|
||||||
loot = Generator.random(Generator.Category.SEED);
|
loot = Generator.random(Generator.Category.SEED);
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 3:
|
||||||
loot = Generator.random(Generator.Category.STONE);
|
loot = Generator.random(Generator.Category.STONE);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user