merging 1.7.5 source: items/scrolls changes

This commit is contained in:
Evan Debenham 2015-02-04 00:40:23 -05:00
parent 9410dbbc8f
commit 6387b697a9
3 changed files with 17 additions and 7 deletions

View File

@ -17,6 +17,8 @@
*/
package com.shatteredpixel.shatteredpixeldungeon.items.scrolls;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mimic;
import com.shatteredpixel.shatteredpixeldungeon.items.Heap;
import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
import com.watabou.noosa.audio.Sample;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
@ -43,7 +45,17 @@ public class ScrollOfRage extends Scroll {
Buff.prolong(mob, Amok.class, 5f);
}
}
for (Heap heap : Dungeon.level.heaps.values()) {
if (heap.type == Heap.Type.MIMIC) {
Mimic m = Mimic.spawnAt( heap.pos, heap.items );
if (m != null) {
m.beckon( curUser.pos );
heap.destroy();
}
}
}
GLog.w( "The scroll emits an enraging roar that echoes throughout the dungeon!" );
setKnown();

View File

@ -45,9 +45,8 @@ public class ScrollOfTerror extends Scroll {
Mob affected = null;
for (Mob mob : Dungeon.level.mobs.toArray( new Mob[0] )) {
if (Level.fieldOfView[mob.pos]) {
Terror terror = Buff.affect( mob, Terror.class, Terror.DURATION );
terror.source = curUser;
Buff.affect( mob, Terror.class, Terror.DURATION ).object = curUser.id();
count++;
affected = mob;
}

View File

@ -42,12 +42,11 @@ public class ScrollOfUpgrade extends InventoryScroll {
ScrollOfRemoveCurse.uncurse( Dungeon.hero, item );
item.upgrade();
upgrade( curUser );
GLog.p( TXT_LOOKS_BETTER, item.name() );
Badges.validateItemLevelAquired( item );
upgrade( curUser );
}
public static void upgrade( Hero hero ) {