v0.3.2c: added visual effect for soul mark, reduced soul mark duration considerably
This commit is contained in:
parent
0ef4ad71fc
commit
38d25f33bb
|
@ -20,13 +20,12 @@
|
|||
*/
|
||||
package com.shatteredpixel.shatteredpixeldungeon.actors.buffs;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.ShadowParticle;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
|
||||
|
||||
public class SoulMark extends FlavourBuff {
|
||||
|
||||
public static final float DURATION = 50f;
|
||||
public static final float DURATION = 10f;
|
||||
|
||||
{
|
||||
type = buffType.NEGATIVE;
|
||||
|
@ -38,17 +37,14 @@ public class SoulMark extends FlavourBuff {
|
|||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Soul Marked";
|
||||
public void fx(boolean on) {
|
||||
if (on) target.sprite.add(CharSprite.State.MARKED);
|
||||
else target.sprite.remove(CharSprite.State.MARKED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean attachTo(Char target) {
|
||||
if (super.attachTo(target) && target.sprite != null){
|
||||
target.sprite.emitter().burst(ShadowParticle.UP, 10);
|
||||
return true;
|
||||
} else
|
||||
return false;
|
||||
public String toString() {
|
||||
return "Soul Marked";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -135,7 +135,7 @@ public abstract class Wand extends Item {
|
|||
if (target != Dungeon.hero &&
|
||||
Dungeon.hero.subClass == HeroSubClass.WARLOCK &&
|
||||
Random.Float() < .15f + (level()*chargesUsed*0.03f)){
|
||||
SoulMark.prolong(target, SoulMark.class, SoulMark.DURATION);
|
||||
SoulMark.prolong(target, SoulMark.class, SoulMark.DURATION + level());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
package com.shatteredpixel.shatteredpixeldungeon.sprites;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.DarkBlock;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.ShadowParticle;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.SnowParticle;
|
||||
import com.watabou.noosa.Game;
|
||||
import com.watabou.noosa.MovieClip;
|
||||
|
@ -60,7 +61,7 @@ public class CharSprite extends MovieClip implements Tweener.Listener, MovieClip
|
|||
private static final float FLASH_INTERVAL = 0.05f;
|
||||
|
||||
public enum State {
|
||||
BURNING, LEVITATING, INVISIBLE, PARALYSED, FROZEN, ILLUMINATED, CHILLED, DARKENED
|
||||
BURNING, LEVITATING, INVISIBLE, PARALYSED, FROZEN, ILLUMINATED, CHILLED, DARKENED, MARKED
|
||||
}
|
||||
|
||||
protected Animation idle;
|
||||
|
@ -76,6 +77,7 @@ public class CharSprite extends MovieClip implements Tweener.Listener, MovieClip
|
|||
|
||||
protected Emitter burning;
|
||||
protected Emitter chilled;
|
||||
protected Emitter marked;
|
||||
protected Emitter levitation;
|
||||
|
||||
protected IceBlock iceBlock;
|
||||
|
@ -290,6 +292,10 @@ public class CharSprite extends MovieClip implements Tweener.Listener, MovieClip
|
|||
case DARKENED:
|
||||
darkBlock = DarkBlock.darken( this );
|
||||
break;
|
||||
case MARKED:
|
||||
marked = emitter();
|
||||
marked.pour(ShadowParticle.UP, 0.1f);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -337,6 +343,12 @@ public class CharSprite extends MovieClip implements Tweener.Listener, MovieClip
|
|||
darkBlock = null;
|
||||
}
|
||||
break;
|
||||
case MARKED:
|
||||
if (marked != null){
|
||||
marked.on = false;
|
||||
marked = null;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user