v1.3.0: replaced some odd uses of Int with IntRange

This commit is contained in:
Evan Debenham
2022-06-02 12:51:24 -04:00
parent 59ca2f4790
commit f0405f5e77
4 changed files with 4 additions and 4 deletions

View File

@@ -47,7 +47,7 @@ public class Bandit extends Thief {
if (super.steal( hero )) {
Buff.prolong( hero, Blindness.class, Blindness.DURATION/2f );
Buff.affect( hero, Poison.class ).set(Random.Int(5, 7) );
Buff.affect( hero, Poison.class ).set(Random.IntRange(5, 6) );
Buff.prolong( hero, Cripple.class, Cripple.DURATION/2f );
Dungeon.observe();

View File

@@ -119,7 +119,7 @@ public class Spinner extends Mob {
public int attackProc(Char enemy, int damage) {
damage = super.attackProc( enemy, damage );
if (Random.Int(2) == 0) {
Buff.affect(enemy, Poison.class).set(Random.Int(7, 9) );
Buff.affect(enemy, Poison.class).set(Random.IntRange(7, 8) );
webCoolDown = 0;
state = FLEEING;
}

View File

@@ -275,7 +275,7 @@ public class Speck extends Image {
break;
case HEART:
speed.set( Random.Int( -10, +10 ), -40 );
speed.set( Random.IntRange( -10, +10 ), -40 );
angularSpeed = Random.Float( -45, +45 );
lifespan = 1f;
break;

View File

@@ -86,7 +86,7 @@ public class Gold extends Item {
@Override
public Item random() {
quantity = Random.Int( 30 + Dungeon.depth * 10, 60 + Dungeon.depth * 20 );
quantity = Random.IntRange( 30 + Dungeon.depth * 10, 60 + Dungeon.depth * 20 );
return this;
}