v0.2.3: improved blandfruit: previously harmful fruit now give unique buffs.
Renamed fruit to be more heavily tied to their seeds. New buffs have placeholder graphics, need permanent ones.
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
package com.shatteredpixel.shatteredpixeldungeon.actors.buffs;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
|
||||
|
||||
import java.util.HashSet;
|
||||
|
||||
/**
|
||||
* Created by debenhame on 19/11/2014.
|
||||
*/
|
||||
public class EarthImbue extends FlavourBuff {
|
||||
|
||||
public static final float DURATION = 20f;
|
||||
|
||||
public void proc(Char enemy){
|
||||
Buff.affect(enemy, Roots.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int icon() {
|
||||
return BuffIndicator.IMMUNITY;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Imbued with Earth";
|
||||
}
|
||||
|
||||
public static final HashSet<Class<?>> IMMUNITIES = new HashSet<Class<?>>();
|
||||
static {
|
||||
IMMUNITIES.add( Paralysis.class );
|
||||
IMMUNITIES.add( Roots.class );
|
||||
IMMUNITIES.add( Slow.class );
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.shatteredpixel.shatteredpixeldungeon.actors.buffs;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.FlameParticle;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
|
||||
import com.watabou.utils.Random;
|
||||
|
||||
import java.util.HashSet;
|
||||
|
||||
/**
|
||||
* Created by debenhame on 19/11/2014.
|
||||
*/
|
||||
public class FireImbue extends Buff {
|
||||
|
||||
public static final float DURATION = 20f;
|
||||
|
||||
@Override
|
||||
public boolean act() {
|
||||
if (Dungeon.level.map[target.pos] == Terrain.GRASS)
|
||||
Dungeon.level.set(target.pos, Terrain.EMBERS);
|
||||
|
||||
spend(TICK);
|
||||
return true;
|
||||
}
|
||||
|
||||
public void proc(Char enemy){
|
||||
if (Random.Int(3) == 0)
|
||||
Buff.affect( enemy, Burning.class ).reignite( enemy );
|
||||
|
||||
enemy.sprite.emitter().burst( FlameParticle.FACTORY, 2 );
|
||||
}
|
||||
|
||||
@Override
|
||||
public int icon() {
|
||||
return BuffIndicator.IMMUNITY;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Imbued with Fire";
|
||||
}
|
||||
|
||||
public static final HashSet<Class<?>> IMMUNITIES = new HashSet<Class<?>>();
|
||||
static {
|
||||
IMMUNITIES.add( Burning.class );
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.shatteredpixel.shatteredpixeldungeon.actors.buffs;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Blob;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.ToxicGas;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
|
||||
|
||||
import java.util.HashSet;
|
||||
|
||||
/**
|
||||
* Created by debenhame on 19/11/2014.
|
||||
*/
|
||||
public class ToxicImbue extends Buff {
|
||||
|
||||
public static final float DURATION = 20f;
|
||||
|
||||
@Override
|
||||
public boolean act() {
|
||||
GameScene.add(Blob.seed(target.pos, 50, ToxicGas.class));
|
||||
|
||||
spend(TICK);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int icon() {
|
||||
return BuffIndicator.IMMUNITY;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Imbued with Toxicity";
|
||||
}
|
||||
|
||||
public static final HashSet<Class<?>> IMMUNITIES = new HashSet<Class<?>>();
|
||||
static {
|
||||
IMMUNITIES.add( ToxicGas.class );
|
||||
IMMUNITIES.add( Poison.class );
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user