Merging Source v1.7.2: item changes

This commit is contained in:
Evan Debenham
2014-10-21 00:38:15 -04:00
parent 4a49763309
commit 13afc9df8d
32 changed files with 523 additions and 269 deletions
@@ -17,9 +17,11 @@
*/
package com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Terror;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Vertigo;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.Weapon;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite.Glowing;
@@ -39,9 +41,12 @@ public class Horror extends Weapon.Enchantment {
int level = Math.max( 0, weapon.level );
if (Random.Int( level + 5 ) >= 4) {
Terror terror = Buff.affect( defender, Terror.class, Terror.DURATION );
terror.source = attacker;
if (defender == Dungeon.hero) {
Buff.affect( defender, Vertigo.class, Vertigo.duration(defender) );
} else {
Buff.affect( defender, Terror.class, Terror.DURATION ).source = attacker;
}
return true;
} else {