v1.3.0: fixed nature's bounty not respecting drop cap
This commit is contained in:
+4
-2
@@ -101,7 +101,8 @@ public class HighGrass {
|
|||||||
Talent.NatureBerriesDropped dropped = Buff.affect(ch, Talent.NatureBerriesDropped.class);
|
Talent.NatureBerriesDropped dropped = Buff.affect(ch, Talent.NatureBerriesDropped.class);
|
||||||
berriesAvailable -= dropped.count();
|
berriesAvailable -= dropped.count();
|
||||||
|
|
||||||
int targetFloor = 2 + 2*((Hero)ch).pointsInTalent(Talent.NATURES_BOUNTY);
|
if (berriesAvailable > 0) {
|
||||||
|
int targetFloor = 2 + 2 * ((Hero) ch).pointsInTalent(Talent.NATURES_BOUNTY);
|
||||||
targetFloor -= berriesAvailable;
|
targetFloor -= berriesAvailable;
|
||||||
targetFloor += (targetFloor >= 5) ? 3 : 2;
|
targetFloor += (targetFloor >= 5) ? 3 : 2;
|
||||||
|
|
||||||
@@ -111,10 +112,11 @@ public class HighGrass {
|
|||||||
else if (Dungeon.depth == targetFloor) droppingBerry = Random.Int(30) == 0;
|
else if (Dungeon.depth == targetFloor) droppingBerry = Random.Int(30) == 0;
|
||||||
else if (Dungeon.depth < targetFloor) droppingBerry = Random.Int(90) == 0;
|
else if (Dungeon.depth < targetFloor) droppingBerry = Random.Int(90) == 0;
|
||||||
|
|
||||||
if (droppingBerry){
|
if (droppingBerry) {
|
||||||
dropped.countUp(1);
|
dropped.countUp(1);
|
||||||
level.drop(new Berry(), pos).sprite.drop();
|
level.drop(new Berry(), pos).sprite.drop();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user