v0.7.2: added a safety check to new wealth logic
This commit is contained in:
parent
2dc3696a17
commit
d23ad85596
|
@ -633,7 +633,7 @@ public abstract class Mob extends Char {
|
||||||
if (properties.contains(Property.BOSS)) rolls = 15;
|
if (properties.contains(Property.BOSS)) rolls = 15;
|
||||||
else if (properties.contains(Property.MINIBOSS)) rolls = 5;
|
else if (properties.contains(Property.MINIBOSS)) rolls = 5;
|
||||||
ArrayList<Item> bonus = RingOfWealth.tryForBonusDrop(Dungeon.hero, rolls);
|
ArrayList<Item> bonus = RingOfWealth.tryForBonusDrop(Dungeon.hero, rolls);
|
||||||
if (!bonus.isEmpty()) {
|
if (bonus != null && !bonus.isEmpty()) {
|
||||||
for (Item b : bonus) Dungeon.level.drop(b, pos).sprite.drop();
|
for (Item b : bonus) Dungeon.level.drop(b, pos).sprite.drop();
|
||||||
if (RingOfWealth.latestDropWasRare){
|
if (RingOfWealth.latestDropWasRare){
|
||||||
new Flare(8, 48).color(0xAA00FF, true).show(sprite, 2f);
|
new Flare(8, 48).color(0xAA00FF, true).show(sprite, 2f);
|
||||||
|
|
|
@ -141,7 +141,7 @@ public class Heap implements Bundlable {
|
||||||
if (type != Type.MIMIC) {
|
if (type != Type.MIMIC) {
|
||||||
type = Type.HEAP;
|
type = Type.HEAP;
|
||||||
ArrayList<Item> bonus = RingOfWealth.tryForBonusDrop(hero, 1);
|
ArrayList<Item> bonus = RingOfWealth.tryForBonusDrop(hero, 1);
|
||||||
if (!bonus.isEmpty()) {
|
if (bonus != null && !bonus.isEmpty()) {
|
||||||
items.addAll(0, bonus);
|
items.addAll(0, bonus);
|
||||||
if (RingOfWealth.latestDropWasRare){
|
if (RingOfWealth.latestDropWasRare){
|
||||||
new Flare(8, 48).color(0xAA00FF, true).show(sprite, 2f);
|
new Flare(8, 48).color(0xAA00FF, true).show(sprite, 2f);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user