v0.3.0: reworked wand of regrowth, some polish needed though

This commit is contained in:
Evan Debenham
2015-05-20 02:02:37 -04:00
parent 7d8ba7dd28
commit c3cba0f046
7 changed files with 289 additions and 33 deletions
@@ -25,9 +25,6 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroSubClass;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Bestiary;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Yog;
import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter;
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.PoisonParticle;
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.CloakOfShadows;
import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain;
import com.shatteredpixel.shatteredpixeldungeon.levels.features.Door;
@@ -202,6 +199,8 @@ public abstract class Char extends Actor {
public static boolean hit( Char attacker, Char defender, boolean magic ) {
float acuRoll = Random.Float( attacker.attackSkill( defender ) );
float defRoll = Random.Float( defender.defenseSkill( attacker ) );
if (attacker.buff(Bless.class) != null) acuRoll *= 1.20f;
if (defender.buff(Bless.class) != null) defRoll *= 1.20f;
return (magic ? acuRoll * 2 : acuRoll) >= defRoll;
}