V0.1.0 Partial Commit

changed package and application names to differentiate from main PD
release
This commit is contained in:
Evan Debenham
2014-08-03 14:46:22 -04:00
parent 65dd9c2dc0
commit aed303672a
474 changed files with 3468 additions and 3458 deletions
@@ -0,0 +1,51 @@
/*
* Pixel Dungeon
* Copyright (C) 2012-2014 Oleg Dolya
*
* 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.ItemSpriteSheet;
public class CorpseDust extends Item {
{
name = "corpse dust";
image = ItemSpriteSheet.DUST;
cursed = true;
cursedKnown = true;
unique = true;
}
@Override
public boolean isUpgradable() {
return false;
}
@Override
public boolean isIdentified() {
return true;
}
@Override
public String info() {
return
"The ball of corpse dust doesn't differ outwardly from a regular dust ball. However, " +
"you know somehow that it's better to get rid of it as soon as possible.";
}
}
@@ -0,0 +1,54 @@
/*
* Pixel Dungeon
* Copyright (C) 2012-2014 Oleg Dolya
*
* 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.ItemSpriteSheet;
public class DarkGold extends Item {
{
name = "dark gold ore";
image = ItemSpriteSheet.ORE;
stackable = true;
unique = true;
}
@Override
public boolean isUpgradable() {
return false;
}
@Override
public boolean isIdentified() {
return true;
}
@Override
public String info() {
return
"This metal is called dark not because of its color (it doesn't differ from the normal gold), " +
"but because it melts under the daylight, making it useless on the surface.";
}
@Override
public int price() {
return quantity;
}
}
@@ -0,0 +1,47 @@
/*
* Pixel Dungeon
* Copyright (C) 2012-2014 Oleg Dolya
*
* 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.ItemSpriteSheet;
public class DriedRose extends Item {
{
name = "dried rose";
image = ItemSpriteSheet.ROSE;
unique = true;
}
@Override
public boolean isUpgradable() {
return false;
}
@Override
public boolean isIdentified() {
return true;
}
@Override
public String info() {
return
"The rose has dried long ago, but it has kept all its petals somehow.";
}
}
@@ -0,0 +1,54 @@
/*
* Pixel Dungeon
* Copyright (C) 2012-2014 Oleg Dolya
*
* 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.ItemSpriteSheet;
public class DwarfToken extends Item {
{
name = "dwarf token";
image = ItemSpriteSheet.TOKEN;
stackable = true;
unique = true;
}
@Override
public boolean isUpgradable() {
return false;
}
@Override
public boolean isIdentified() {
return true;
}
@Override
public String info() {
return
"Many dwarves and some of their larger creations carry these small pieces of metal of unknown purpose. " +
"Maybe they are jewelry or maybe some kind of ID. Dwarves are strange folk.";
}
@Override
public int price() {
return quantity * 100;
}
}
@@ -0,0 +1,177 @@
/*
* Pixel Dungeon
* Copyright (C) 2012-2014 Oleg Dolya
*
* 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 java.util.ArrayList;
import com.watabou.noosa.audio.Sample;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Hunger;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Bat;
import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter;
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.Weapon;
import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain;
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite.Glowing;
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
import com.watabou.utils.Bundle;
import com.watabou.utils.Callback;
public class Pickaxe extends Weapon {
public static final String AC_MINE = "MINE";
public static final float TIME_TO_MINE = 2;
private static final String TXT_NO_VEIN = "There is no dark gold vein near you to mine";
private static final Glowing BLOODY = new Glowing( 0x550000 );
{
name = "pickaxe";
image = ItemSpriteSheet.PICKAXE;
unique = true;
defaultAction = AC_MINE;
STR = 14;
MIN = 3;
MAX = 12;
}
public boolean bloodStained = false;
@Override
public ArrayList<String> actions( Hero hero ) {
ArrayList<String> actions = super.actions( hero );
actions.add( AC_MINE );
return actions;
}
@Override
public void execute( final Hero hero, String action ) {
if (action == AC_MINE) {
if (Dungeon.depth < 11 || Dungeon.depth > 15) {
GLog.w( TXT_NO_VEIN );
return;
}
for (int i=0; i < Level.NEIGHBOURS8.length; i++) {
final int pos = hero.pos + Level.NEIGHBOURS8[i];
if (Dungeon.level.map[pos] == Terrain.WALL_DECO) {
hero.spend( TIME_TO_MINE );
hero.busy();
hero.sprite.attack( pos, new Callback() {
@Override
public void call() {
CellEmitter.center( pos ).burst( Speck.factory( Speck.STAR ), 7 );
Sample.INSTANCE.play( Assets.SND_EVOKE );
Level.set( pos, Terrain.WALL );
GameScene.updateMap( pos );
DarkGold gold = new DarkGold();
if (gold.doPickUp( Dungeon.hero )) {
GLog.i( Hero.TXT_YOU_NOW_HAVE, gold.name() );
} else {
Dungeon.level.drop( gold, hero.pos ).sprite.drop();
}
Hunger hunger = hero.buff( Hunger.class );
if (hunger != null && !hunger.isStarving()) {
hunger.satisfy( -Hunger.STARVING / 10 );
BuffIndicator.refreshHero();
}
hero.onOperateComplete();
}
} );
return;
}
}
GLog.w( TXT_NO_VEIN );
} else {
super.execute( hero, action );
}
}
@Override
public boolean isUpgradable() {
return false;
}
@Override
public boolean isIdentified() {
return true;
}
@Override
public void proc( Char attacker, Char defender, int damage ) {
if (!bloodStained && defender instanceof Bat && (defender.HP <= damage)) {
bloodStained = true;
updateQuickslot();
}
}
private static final String BLOODSTAINED = "bloodStained";
@Override
public void storeInBundle( Bundle bundle ) {
super.storeInBundle( bundle );
bundle.put( BLOODSTAINED, bloodStained );
}
@Override
public void restoreFromBundle( Bundle bundle ) {
super.restoreFromBundle( bundle );
bloodStained = bundle.getBoolean( BLOODSTAINED );
}
@Override
public Glowing glowing() {
return bloodStained ? BLOODY : null;
}
@Override
public String info() {
return
"This is a large and sturdy tool for breaking rocks. Probably it can be used as a weapon.";
}
}
@@ -0,0 +1,52 @@
/*
* Pixel Dungeon
* Copyright (C) 2012-2014 Oleg Dolya
*
* 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.ItemSpriteSheet;
public class RatSkull extends Item {
{
name = "giant rat skull";
image = ItemSpriteSheet.SKULL;
unique = true;
}
@Override
public boolean isUpgradable() {
return false;
}
@Override
public boolean isIdentified() {
return true;
}
@Override
public String info() {
return
"It could be a nice hunting trophy, but it smells too bad to place it on a wall.";
}
@Override
public int price() {
return 100;
}
}