v2.0.0: repulsion now only triggers if enemy is adjacent
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
|
||||
package com.shatteredpixel.shatteredpixeldungeon.items.armor.glyphs;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.armor.Armor;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfBlastWave;
|
||||
@@ -41,7 +42,7 @@ public class Repulsion extends Armor.Glyph {
|
||||
// lvl 1 - 33%
|
||||
// lvl 2 - 43%
|
||||
float procChance = (level+1f)/(level+5f) * procChanceMultiplier(defender);
|
||||
if (Random.Float() < procChance){
|
||||
if (Dungeon.level.adjacent(attacker.pos, defender.pos) && Random.Float() < procChance){
|
||||
|
||||
float powerMulti = Math.max(1f, procChance);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user