v2.5.0: made cursed wand inter-floor teleport less intense

This commit is contained in:
Evan Debenham
2024-08-15 11:49:22 -04:00
parent fe66e03e74
commit ae46f7bd24
@@ -557,9 +557,12 @@ public class CursedWand {
public boolean effect(Item origin, Char user, Ballistica bolt, boolean positiveOnly) { public boolean effect(Item origin, Char user, Ballistica bolt, boolean positiveOnly) {
if (!positiveOnly && Dungeon.depth > 1 && Dungeon.interfloorTeleportAllowed() && user == Dungeon.hero) { if (!positiveOnly && Dungeon.depth > 1 && Dungeon.interfloorTeleportAllowed() && user == Dungeon.hero) {
//each depth has 1 more weight than the previous depth. //starting from 10 floors up (or floor 1), each floor has 1 more weight
float[] depths = new float[Dungeon.depth-1]; float[] depths = new float[Dungeon.depth-1];
for (int i = 1; i < Dungeon.depth; i++) depths[i-1] = i; int start = Math.max(1, Dungeon.depth-10);
for (int i = start; i < Dungeon.depth; i++) {
depths[i-1] = i-start+1;
}
int depth = 1+Random.chances(depths); int depth = 1+Random.chances(depths);
Level.beforeTransition(); Level.beforeTransition();