V0.2.0: reworked Ring of Accuracy, now reduces enemy evasion instead of attack accuracy.
This commit is contained in:
parent
ae271a7f4a
commit
17b71d183c
|
@ -35,6 +35,7 @@ import com.shatteredpixel.shatteredpixeldungeon.effects.Wound;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.Generator;
|
import com.shatteredpixel.shatteredpixeldungeon.items.Generator;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.Heap;
|
import com.shatteredpixel.shatteredpixeldungeon.items.Heap;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfAccuracy;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
|
import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
|
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
||||||
|
@ -378,7 +379,17 @@ public abstract class Mob extends Char {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int defenseSkill( Char enemy ) {
|
public int defenseSkill( Char enemy ) {
|
||||||
return enemySeen && !paralysed ? defenseSkill : 0;
|
if (enemySeen && !paralysed) {
|
||||||
|
int defenseSkill = this.defenseSkill;
|
||||||
|
int penalty = 0;
|
||||||
|
for (Buff buff : enemy.buffs(RingOfAccuracy.Accuracy.class)) {
|
||||||
|
penalty += ((RingOfAccuracy.Accuracy) buff).level;
|
||||||
|
}
|
||||||
|
if (penalty != 0)
|
||||||
|
defenseSkill *= Math.pow(0.8, penalty);
|
||||||
|
return defenseSkill;
|
||||||
|
} else
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -31,7 +31,8 @@ public class RingOfAccuracy extends Ring {
|
||||||
@Override
|
@Override
|
||||||
public String desc() {
|
public String desc() {
|
||||||
return isKnown() ?
|
return isKnown() ?
|
||||||
"This ring increases your chance to hit the enemy." :
|
"This ring increases your focus, reducing your enemy's ability to dodge your attacks. "+
|
||||||
|
"A cursed ring will instead make you easier to evade.":
|
||||||
super.desc();
|
super.desc();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user