v0.3.0: reworked wand of regrowth, some polish needed though
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ public class Regrowth extends Blob {
|
||||
Level.set( i, cur[i] > 9 ? Terrain.HIGH_GRASS : Terrain.GRASS );
|
||||
mapUpdated = true;
|
||||
|
||||
} else if (c == Terrain.GRASS && cur[i] > 9) {
|
||||
} else if (c == Terrain.GRASS && cur[i] > 9 && Dungeon.level.plants.get(i) == null ) {
|
||||
|
||||
Level.set( i, Terrain.HIGH_GRASS );
|
||||
mapUpdated = true;
|
||||
@@ -54,7 +54,7 @@ public class Regrowth extends Blob {
|
||||
}
|
||||
|
||||
Char ch = Actor.findChar( i );
|
||||
if (ch != null) {
|
||||
if (ch != null && cur[i] > 1) {
|
||||
Buff.prolong( ch, Roots.class, TICK );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.shatteredpixel.shatteredpixeldungeon.actors.buffs;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
|
||||
|
||||
/**
|
||||
* Created by debenhame on 27/04/2015.
|
||||
*/
|
||||
public class Bless extends FlavourBuff {
|
||||
|
||||
@Override
|
||||
public int icon() {
|
||||
//TODO: add icon
|
||||
return BuffIndicator.FIRE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Blessed";
|
||||
}
|
||||
|
||||
}
|
||||
@@ -28,6 +28,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Barkskin;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Bleeding;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Bless;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Blindness;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Burning;
|
||||
@@ -1117,12 +1118,11 @@ public class Hero extends Char {
|
||||
defenseSkill++;
|
||||
|
||||
} else {
|
||||
//TODO: add blessed buff here
|
||||
|
||||
Buff.prolong(this, Bless.class, 30f);
|
||||
this.exp = 0;
|
||||
|
||||
GLog.p( "You cannot grow stronger, but your experiences do give you a surge of power!" );
|
||||
//TODO: holy SFX
|
||||
Sample.INSTANCE.play( Assets.SND_LEVELUP );
|
||||
}
|
||||
|
||||
if (lvl < 10) {
|
||||
|
||||
Reference in New Issue
Block a user