v1.3.0: replaced some odd uses of Int with IntRange
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user