v0.3.2: fully implemented elemental embers quest
This commit is contained in:
parent
43327a5f4e
commit
f8749368a4
BIN
assets/items.png
BIN
assets/items.png
Binary file not shown.
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 20 KiB |
|
@ -23,11 +23,15 @@ package com.shatteredpixel.shatteredpixeldungeon.actors.mobs;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Chill;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Chill;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Frost;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Frost;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.items.quest.Embers;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.sprites.NewbornElementalSprite;
|
||||||
|
|
||||||
public class NewbornElemental extends Elemental {
|
public class NewbornElemental extends Elemental {
|
||||||
|
|
||||||
{
|
{
|
||||||
name = "newborn fire elemental";
|
name = "newborn fire elemental";
|
||||||
|
spriteClass = NewbornElementalSprite.class;
|
||||||
|
|
||||||
HT = 65;
|
HT = 65;
|
||||||
HP = HT/2; //32
|
HP = HT/2; //32
|
||||||
|
|
||||||
|
@ -35,7 +39,7 @@ public class NewbornElemental extends Elemental {
|
||||||
|
|
||||||
EXP = 4;
|
EXP = 4;
|
||||||
|
|
||||||
loot = null; //TODO Elemental embers
|
loot = new Embers();
|
||||||
lootChance = 1f;
|
lootChance = 1f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,7 @@ import com.shatteredpixel.shatteredpixeldungeon.Challenges;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.Generator;
|
import com.shatteredpixel.shatteredpixeldungeon.items.Generator;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.quest.CeremonialCandle;
|
import com.shatteredpixel.shatteredpixeldungeon.items.quest.CeremonialCandle;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.items.quest.Embers;
|
||||||
import com.watabou.noosa.audio.Sample;
|
import com.watabou.noosa.audio.Sample;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||||
|
@ -160,7 +161,7 @@ public class Wandmaker extends NPC {
|
||||||
item = Dungeon.hero.belongings.getItem(CorpseDust.class);
|
item = Dungeon.hero.belongings.getItem(CorpseDust.class);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
item = Dungeon.hero.belongings.getItem(CorpseDust.class); //TODO: elemental embers
|
item = Dungeon.hero.belongings.getItem(Embers.class);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
item = Dungeon.hero.belongings.getItem(Rotberry.Seed.class);
|
item = Dungeon.hero.belongings.getItem(Rotberry.Seed.class);
|
||||||
|
|
|
@ -20,14 +20,18 @@
|
||||||
*/
|
*/
|
||||||
package com.shatteredpixel.shatteredpixeldungeon.items.quest;
|
package com.shatteredpixel.shatteredpixeldungeon.items.quest;
|
||||||
|
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.NewbornElemental;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.NewbornElemental;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.ElmoParticle;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.Heap;
|
import com.shatteredpixel.shatteredpixeldungeon.items.Heap;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
|
import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||||
|
import com.watabou.noosa.audio.Sample;
|
||||||
|
|
||||||
|
|
||||||
public class CeremonialCandle extends Item {
|
public class CeremonialCandle extends Item {
|
||||||
|
@ -40,6 +44,7 @@ public class CeremonialCandle extends Item {
|
||||||
image = ItemSpriteSheet.CANDLE;
|
image = ItemSpriteSheet.CANDLE;
|
||||||
|
|
||||||
unique = true;
|
unique = true;
|
||||||
|
stackable = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -90,8 +95,10 @@ public class CeremonialCandle extends Item {
|
||||||
elemental.state = elemental.HUNTING;
|
elemental.state = elemental.HUNTING;
|
||||||
GameScene.add(elemental, 1);
|
GameScene.add(elemental, 1);
|
||||||
|
|
||||||
//TODO visuals
|
for (int i : Level.NEIGHBOURS9){
|
||||||
|
CellEmitter.get(ritualPos+i).burst(ElmoParticle.FACTORY, 10);
|
||||||
|
}
|
||||||
|
Sample.INSTANCE.play(Assets.SND_BURNING);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,56 @@
|
||||||
|
/*
|
||||||
|
* Pixel Dungeon
|
||||||
|
* Copyright (C) 2012-2015 Oleg Dolya
|
||||||
|
*
|
||||||
|
* Shattered Pixel Dungeon
|
||||||
|
* Copyright (C) 2014-2015 Evan Debenham
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||||
|
*/
|
||||||
|
package com.shatteredpixel.shatteredpixeldungeon.items.quest;
|
||||||
|
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||||
|
|
||||||
|
public class Embers extends Item {
|
||||||
|
|
||||||
|
{
|
||||||
|
name = "elemental embers";
|
||||||
|
image = ItemSpriteSheet.EMBER;
|
||||||
|
|
||||||
|
unique = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isUpgradable() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isIdentified() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String info() {
|
||||||
|
return
|
||||||
|
"ember"; //TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ItemSprite.Glowing glowing() {
|
||||||
|
return new ItemSprite.Glowing(0x660000, 3f);
|
||||||
|
}
|
||||||
|
}
|
|
@ -171,7 +171,7 @@ public abstract class RegularLevel extends Level {
|
||||||
protected void placeSign(){
|
protected void placeSign(){
|
||||||
while (true) {
|
while (true) {
|
||||||
int pos = roomEntrance.random();
|
int pos = roomEntrance.random();
|
||||||
if (pos != entrance && traps.get(pos) == null) {
|
if (pos != entrance && traps.get(pos) == null && findMob(pos) == null) {
|
||||||
map[pos] = Terrain.SIGN;
|
map[pos] = Terrain.SIGN;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,7 +35,9 @@ public class EntrancePainter extends Painter {
|
||||||
door.set( Room.Door.Type.REGULAR );
|
door.set( Room.Door.Type.REGULAR );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
do {
|
||||||
level.entrance = room.random(1);
|
level.entrance = room.random(1);
|
||||||
|
} while (level.findMob(level.entrance) != null);
|
||||||
set( level, level.entrance, Terrain.ENTRANCE );
|
set( level, level.entrance, Terrain.ENTRANCE );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -225,9 +225,10 @@ public class ItemSpriteSheet {
|
||||||
public static final int SKULL = ROW14+0;
|
public static final int SKULL = ROW14+0;
|
||||||
public static final int DUST = ROW14+1;
|
public static final int DUST = ROW14+1;
|
||||||
public static final int CANDLE = ROW14+2;
|
public static final int CANDLE = ROW14+2;
|
||||||
public static final int PICKAXE = ROW14+3;
|
public static final int EMBER = ROW14+3;
|
||||||
public static final int ORE = ROW14+4;
|
public static final int PICKAXE = ROW14+4;
|
||||||
public static final int TOKEN = ROW14+5;
|
public static final int ORE = ROW14+5;
|
||||||
|
public static final int TOKEN = ROW14+6;
|
||||||
|
|
||||||
//Row Fifteen: Containers/Bags
|
//Row Fifteen: Containers/Bags
|
||||||
public static final int VIAL = ROW15+0;
|
public static final int VIAL = ROW15+0;
|
||||||
|
|
|
@ -0,0 +1,72 @@
|
||||||
|
/*
|
||||||
|
* Pixel Dungeon
|
||||||
|
* Copyright (C) 2012-2015 Oleg Dolya
|
||||||
|
*
|
||||||
|
* Shattered Pixel Dungeon
|
||||||
|
* Copyright (C) 2014-2015 Evan Debenham
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||||
|
*/
|
||||||
|
package com.shatteredpixel.shatteredpixeldungeon.sprites;
|
||||||
|
|
||||||
|
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||||
|
import com.watabou.noosa.MovieClip;
|
||||||
|
import com.watabou.noosa.TextureFilm;
|
||||||
|
|
||||||
|
public class NewbornElementalSprite extends MobSprite{
|
||||||
|
|
||||||
|
public NewbornElementalSprite() {
|
||||||
|
super();
|
||||||
|
|
||||||
|
texture( Assets.ELEMENTAL );
|
||||||
|
|
||||||
|
int ofs = 22;
|
||||||
|
|
||||||
|
TextureFilm frames = new TextureFilm( texture, 12, 14 );
|
||||||
|
|
||||||
|
idle = new MovieClip.Animation( 10, true );
|
||||||
|
idle.frames( frames, ofs+0, ofs+1, ofs+2 );
|
||||||
|
|
||||||
|
run = new MovieClip.Animation( 12, true );
|
||||||
|
run.frames( frames, ofs+0, ofs+1, ofs+3 );
|
||||||
|
|
||||||
|
attack = new MovieClip.Animation( 15, false );
|
||||||
|
attack.frames( frames, ofs+4, ofs+5, ofs+6 );
|
||||||
|
|
||||||
|
die = new MovieClip.Animation( 15, false );
|
||||||
|
die.frames( frames, ofs+7, ofs+8, ofs+9, ofs+10, ofs+11, ofs+12, ofs+13, ofs+12 );
|
||||||
|
|
||||||
|
play( idle );
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void link( Char ch ) {
|
||||||
|
super.link( ch );
|
||||||
|
add( CharSprite.State.BURNING );
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void die() {
|
||||||
|
super.die();
|
||||||
|
remove( CharSprite.State.BURNING );
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int blood() {
|
||||||
|
return 0xFFFF7D13;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user