Java Code Examples for com.watabou.utils.Random#NormalIntRange
The following examples show how to use
com.watabou.utils.Random#NormalIntRange .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Goo.java From shattered-pixel-dungeon-gdx with GNU General Public License v3.0 | 6 votes |
@Override public int damageRoll() { int min = 1; int max = (HP*2 <= HT) ? 12 : 8; if (pumpedUp > 0) { pumpedUp = 0; PathFinder.buildDistanceMap( pos, BArray.not( Dungeon.level.solid, null ), 2 ); for (int i = 0; i < PathFinder.distance.length; i++) { if (PathFinder.distance[i] < Integer.MAX_VALUE) CellEmitter.get(i).burst(ElmoParticle.FACTORY, 10); } Sample.INSTANCE.play( Assets.SND_BURNING ); return Random.NormalIntRange( min*3, max*3 ); } else { return Random.NormalIntRange( min, max ); } }
Example 2
Source File: WandOfLivingEarth.java From shattered-pixel-dungeon with GNU General Public License v3.0 | 5 votes |
@Override public int drRoll() { if (Dungeon.isChallenged(Challenges.NO_ARMOR)){ return Random.NormalIntRange(wandLevel, 2 + wandLevel); } else { return Random.NormalIntRange(wandLevel, 3 + 3 * wandLevel); } }
Example 3
Source File: WandOfFrost.java From unleashed-pixel-dungeon with GNU General Public License v3.0 | 5 votes |
@Override protected void onZap(Ballistica bolt) { Heap heap = Dungeon.level.heaps.get(bolt.collisionPos); if (heap != null) { heap.freeze(); } Char ch = Actor.findChar(bolt.collisionPos); if (ch != null){ int damage = Random.NormalIntRange(5+level, 10+(level*level/3)); if (ch.buff(Frost.class) != null){ return; //do nothing, can't affect a frozen target } if (ch.buff(Chill.class) != null){ damage = Math.round(damage * ch.buff(Chill.class).speedFactor()); } else { ch.sprite.burst( 0xFF99CCFF, level / 2 + 2 ); } ch.damage(damage, this); if (ch.isAlive()){ if (Level.water[ch.pos]){ //20+(10*level)% chance if (Random.Int(10) >= 8-level ) Buff.affect(ch, Frost.class, Frost.duration(ch)*Random.Float(2f, 4f)); else Buff.prolong(ch, Chill.class, 6+level); } else { Buff.prolong(ch, Chill.class, 4+level); } } } }
Example 4
Source File: WandOfLivingEarth.java From shattered-pixel-dungeon-gdx with GNU General Public License v3.0 | 4 votes |
@Override public int damageRoll() { return Random.NormalIntRange(2, 4 + Dungeon.depth/2); }
Example 5
Source File: OldTengu.java From shattered-pixel-dungeon-gdx with GNU General Public License v3.0 | 4 votes |
@Override public int drRoll() { return Random.NormalIntRange(0, 5); }
Example 6
Source File: EnslavedSoul.java From remixed-dungeon with GNU General Public License v3.0 | 4 votes |
@Override public int damageRoll() { return Random.NormalIntRange(5, 8); }
Example 7
Source File: Senior.java From remixed-dungeon with GNU General Public License v3.0 | 4 votes |
@Override public int damageRoll() { return Random.NormalIntRange( 12, 20 ); }
Example 8
Source File: NewTengu.java From shattered-pixel-dungeon with GNU General Public License v3.0 | 4 votes |
@Override public int damageRoll() { return Random.NormalIntRange( 6, 12 ); }
Example 9
Source File: Thief.java From shattered-pixel-dungeon with GNU General Public License v3.0 | 4 votes |
@Override public int damageRoll() { return Random.NormalIntRange( 1, 10 ); }
Example 10
Source File: RotLasher.java From shattered-pixel-dungeon-gdx with GNU General Public License v3.0 | 4 votes |
@Override public int damageRoll() { return Random.NormalIntRange(8, 15); }
Example 11
Source File: Ghoul.java From shattered-pixel-dungeon with GNU General Public License v3.0 | 4 votes |
@Override public int damageRoll() { return Random.NormalIntRange( 16, 22 ); }
Example 12
Source File: Brute.java From unleashed-pixel-dungeon with GNU General Public License v3.0 | 4 votes |
@Override public int damageRoll() { return enraged ? Random.NormalIntRange((dmgMin + 2), ((dmgMax + 2) * 2)) : Random.NormalIntRange( dmgMin, dmgMax ); }
Example 13
Source File: Rat.java From shattered-pixel-dungeon with GNU General Public License v3.0 | 4 votes |
@Override public int drRoll() { return Random.NormalIntRange(0, 1); }
Example 14
Source File: Worm.java From remixed-dungeon with GNU General Public License v3.0 | 4 votes |
@Override public int damageRoll() { return Random.NormalIntRange(22, 45); }
Example 15
Source File: King.java From shattered-pixel-dungeon-gdx with GNU General Public License v3.0 | 4 votes |
@Override public int drRoll() { return Random.NormalIntRange(0, 5); }
Example 16
Source File: Mob.java From unleashed-pixel-dungeon with GNU General Public License v3.0 | 4 votes |
@Override public int damageRoll() { return Random.NormalIntRange(dmgMin, dmgMax); }
Example 17
Source File: Thief.java From shattered-pixel-dungeon-gdx with GNU General Public License v3.0 | 4 votes |
@Override public int drRoll() { return Random.NormalIntRange(0, 3); }
Example 18
Source File: YogsTeeth.java From remixed-dungeon with GNU General Public License v3.0 | 4 votes |
@Override public int damageRoll() { return Random.NormalIntRange(50, 80); }
Example 19
Source File: RotHeart.java From shattered-pixel-dungeon-gdx with GNU General Public License v3.0 | 4 votes |
@Override public int drRoll() { return Random.NormalIntRange(0, 5); }
Example 20
Source File: ShadowLord.java From remixed-dungeon with GNU General Public License v3.0 | 4 votes |
@Override public int damageRoll() { return Random.NormalIntRange(30, 40); }