v2.5.3: vampiric no longer triggers on allies or neutral characters
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
package com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mimic;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.FloatingText;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.Weapon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
|
||||
@@ -42,7 +43,9 @@ public class Vampiric extends Weapon.Enchantment {
|
||||
|
||||
healChance *= procChanceMultiplier(attacker);
|
||||
|
||||
if (Random.Float() < healChance){
|
||||
if (Random.Float() < healChance
|
||||
&& attacker.alignment != defender.alignment
|
||||
&& (defender.alignment != Char.Alignment.NEUTRAL || defender instanceof Mimic)){
|
||||
|
||||
float powerMulti = Math.max(1f, healChance);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user