V0.1.1: more work on lullaby.

This commit is contained in:
Evan Debenham
2014-08-13 00:26:16 -04:00
parent 52abd25647
commit 5c1526e430
3 changed files with 22 additions and 13 deletions
@@ -41,19 +41,15 @@ public class ScrollOfLullaby extends Scroll {
curUser.sprite.centerEmitter().start( Speck.factory( Speck.NOTE ), 0.3f, 5 );
Sample.INSTANCE.play( Assets.SND_LULLABY );
Invisibility.dispel();
int count = 0;
Mob affected = null;
for (Mob mob : Dungeon.level.mobs.toArray( new Mob[0] )) {
if (Level.fieldOfView[mob.pos]) {
Buff.affect( mob, Drowsy.class );
if (mob.buff( Drowsy.class ) != null) {
affected = mob;
count++;
}
}
}
Buff.affect( curUser, Drowsy.class );
GLog.i( "The scroll utters a soothing melody. You feel very sleepy." );
setKnown();