v0.2.2: added new plants (very rough, many details to add)

This commit is contained in:
Evan Debenham
2014-10-24 15:54:49 -04:00
parent fa53d78809
commit 7648e8fc17
2 changed files with 67 additions and 11 deletions

View File

@@ -17,21 +17,21 @@
*/
package com.shatteredpixel.shatteredpixeldungeon.plants;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Blob;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfInvisibility;
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.MagicalSleep;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfPurity;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
public class Dreamweed extends Plant {
public class Dreamfoil extends Plant {
private static final String TXT_DESC =
"Upon touching a Dreamweed it secretes a glittering cloud of confusing gas.";
"DESC HERE";
{
image = 3;
plantName = "Dreamweed";
plantName = "Dreamfoil";
}
@Override
@@ -39,6 +39,8 @@ public class Dreamweed extends Plant {
super.activate( ch );
if (ch != null) {
if (ch instanceof Mob)
Buff.affect(ch, MagicalSleep.class);
//GameScene.add(Blob.seed(pos, 300 + 20 * Dungeon.depth, ConfusionGas.class));
}
}
@@ -50,13 +52,13 @@ public class Dreamweed extends Plant {
public static class Seed extends Plant.Seed {
{
plantName = "Dreamweed";
plantName = "Dreamfoil";
name = "seed of " + plantName;
image = ItemSpriteSheet.SEED_DREAMWEED;
image = ItemSpriteSheet.SEED_SORROWMOSS;
plantClass = Dreamweed.class;
alchemyClass = PotionOfInvisibility.class;
plantClass = Dreamfoil.class;
alchemyClass = PotionOfPurity.class;
}
@Override

View File

@@ -0,0 +1,54 @@
package com.shatteredpixel.shatteredpixeldungeon.plants;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.ConfusionGas;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.MagicalSleep;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Vertigo;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfLevitation;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
/**
* Created by Evan on 23/10/2014.
*/
public class Stormvine extends Plant {
private static final String TXT_DESC =
"DESC HERE";
{
image = 3;
plantName = "Stormvine";
}
@Override
public void activate( Char ch ) {
super.activate( ch );
if (ch != null) {
Buff.affect(ch, Vertigo.class, Vertigo.duration( ch ) );
}
}
@Override
public String desc() {
return TXT_DESC;
}
public static class Seed extends Plant.Seed {
{
plantName = "Dreamfoil";
name = "seed of " + plantName;
image = ItemSpriteSheet.SEED_ICECAP;
plantClass = Stormvine.class;
alchemyClass = PotionOfLevitation.class;
}
@Override
public String desc() {
return TXT_DESC;
}
}
}