V0.1.0 Partial Commit
changed package and application names to differentiate from main PD release
This commit is contained in:
@@ -0,0 +1,106 @@
|
||||
/*
|
||||
* 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.weapon.missiles;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.Weapon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Piercing;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Swing;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.MissileSprite;
|
||||
|
||||
public class Boomerang extends MissileWeapon {
|
||||
|
||||
{
|
||||
name = "boomerang";
|
||||
image = ItemSpriteSheet.BOOMERANG;
|
||||
|
||||
STR = 10;
|
||||
|
||||
MIN = 1;
|
||||
MAX = 4;
|
||||
|
||||
stackable = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isUpgradable() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item upgrade() {
|
||||
return upgrade( false );
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item upgrade( boolean enchant ) {
|
||||
MIN += 1;
|
||||
MAX += 2;
|
||||
super.upgrade( enchant );
|
||||
|
||||
updateQuickslot();
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item degrade() {
|
||||
MIN -= 1;
|
||||
MAX -= 2;
|
||||
return super.degrade();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Weapon enchant( Enchantment ench ) {
|
||||
while (ench instanceof Piercing || ench instanceof Swing) {
|
||||
ench = Enchantment.random();
|
||||
}
|
||||
|
||||
return super.enchant( ench );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void proc( Char attacker, Char defender, int damage ) {
|
||||
super.proc( attacker, defender, damage );
|
||||
if (attacker instanceof Hero && ((Hero)attacker).usingRanged) {
|
||||
circleBack( defender.pos, (Hero)attacker );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void miss( int cell ) {
|
||||
circleBack( cell, curUser );
|
||||
}
|
||||
|
||||
private void circleBack( int from, Hero owner ) {
|
||||
if (!collect( curUser.belongings.backpack )) {
|
||||
Dungeon.level.drop( this, owner.pos ).sprite.drop();
|
||||
}
|
||||
((MissileSprite)curUser.sprite.parent.recycle( MissileSprite.class )).
|
||||
reset( from, curUser.pos, curItem, null );
|
||||
}
|
||||
|
||||
@Override
|
||||
public String desc() {
|
||||
return
|
||||
"Thrown to the enemy this flat curved wooden missile will return to the hands of its thrower.";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
/*
|
||||
* 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.weapon.missiles;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Paralysis;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||
import com.watabou.utils.Random;
|
||||
|
||||
public class CurareDart extends MissileWeapon {
|
||||
|
||||
public static final float DURATION = 3f;
|
||||
|
||||
{
|
||||
name = "curare dart";
|
||||
image = ItemSpriteSheet.CURARE_DART;
|
||||
|
||||
STR = 14;
|
||||
|
||||
MIN = 1;
|
||||
MAX = 3;
|
||||
}
|
||||
|
||||
public CurareDart() {
|
||||
this( 1 );
|
||||
}
|
||||
|
||||
public CurareDart( int number ) {
|
||||
super();
|
||||
quantity = number;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void proc( Char attacker, Char defender, int damage ) {
|
||||
Buff.prolong( defender, Paralysis.class, DURATION );
|
||||
super.proc( attacker, defender, damage );
|
||||
}
|
||||
|
||||
@Override
|
||||
public String desc() {
|
||||
return
|
||||
"These little evil darts don't do much damage but they can paralyze " +
|
||||
"the target leaving it helpless and motionless for some time.";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item random() {
|
||||
quantity = Random.Int( 2, 5 );
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int price() {
|
||||
return 12 * quantity;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* 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.weapon.missiles;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||
import com.watabou.utils.Random;
|
||||
|
||||
public class Dart extends MissileWeapon {
|
||||
|
||||
{
|
||||
name = "dart";
|
||||
image = ItemSpriteSheet.DART;
|
||||
|
||||
MIN = 1;
|
||||
MAX = 4;
|
||||
}
|
||||
|
||||
public Dart() {
|
||||
this( 1 );
|
||||
}
|
||||
|
||||
public Dart( int number ) {
|
||||
super();
|
||||
quantity = number;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String desc() {
|
||||
return
|
||||
"These simple metal spikes are weighted to fly true and " +
|
||||
"sting their prey with a flick of the wrist.";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item random() {
|
||||
quantity = Random.Int( 5, 15 );
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int price() {
|
||||
return quantity * 2;
|
||||
}
|
||||
}
|
||||
+93
@@ -0,0 +1,93 @@
|
||||
/*
|
||||
* 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.weapon.missiles;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Blob;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Fire;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Burning;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||
import com.watabou.utils.Random;
|
||||
|
||||
public class IncendiaryDart extends MissileWeapon {
|
||||
|
||||
{
|
||||
name = "incendiary dart";
|
||||
image = ItemSpriteSheet.INCENDIARY_DART;
|
||||
|
||||
STR = 12;
|
||||
|
||||
MIN = 1;
|
||||
MAX = 2;
|
||||
}
|
||||
|
||||
public IncendiaryDart() {
|
||||
this( 1 );
|
||||
}
|
||||
|
||||
public IncendiaryDart( int number ) {
|
||||
super();
|
||||
quantity = number;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onThrow( int cell ) {
|
||||
Char enemy = Actor.findChar( cell );
|
||||
if (enemy == null || enemy == curUser) {
|
||||
if (Level.flamable[cell]) {
|
||||
GameScene.add( Blob.seed( cell, 4, Fire.class ) );
|
||||
} else {
|
||||
super.onThrow( cell );
|
||||
}
|
||||
} else {
|
||||
if (!curUser.shoot( enemy, this )) {
|
||||
Dungeon.level.drop( this, cell ).sprite.drop();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void proc( Char attacker, Char defender, int damage ) {
|
||||
Buff.affect( defender, Burning.class ).reignite( defender );
|
||||
super.proc( attacker, defender, damage );
|
||||
}
|
||||
|
||||
@Override
|
||||
public String desc() {
|
||||
return
|
||||
"The spike on each of these darts is designed to pin it to its target " +
|
||||
"while the unstable compounds strapped to its length burst into brilliant flames.";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item random() {
|
||||
quantity = Random.Int( 3, 6 );
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int price() {
|
||||
return 10 * quantity;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* 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.weapon.missiles;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Cripple;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||
import com.watabou.utils.Random;
|
||||
|
||||
public class Javelin extends MissileWeapon {
|
||||
|
||||
{
|
||||
name = "javelin";
|
||||
image = ItemSpriteSheet.JAVELIN;
|
||||
|
||||
STR = 15;
|
||||
|
||||
MIN = 2;
|
||||
MAX = 15;
|
||||
}
|
||||
|
||||
public Javelin() {
|
||||
this( 1 );
|
||||
}
|
||||
|
||||
public Javelin( int number ) {
|
||||
super();
|
||||
quantity = number;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void proc( Char attacker, Char defender, int damage ) {
|
||||
super.proc( attacker, defender, damage );
|
||||
Buff.prolong( defender, Cripple.class, Cripple.DURATION );
|
||||
}
|
||||
|
||||
@Override
|
||||
public String desc() {
|
||||
return
|
||||
"This length of metal is weighted to keep the spike " +
|
||||
"at its tip foremost as it sails through the air.";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item random() {
|
||||
quantity = Random.Int( 5, 15 );
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int price() {
|
||||
return 15 * quantity;
|
||||
}
|
||||
}
|
||||
+144
@@ -0,0 +1,144 @@
|
||||
/*
|
||||
* 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.weapon.missiles;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroClass;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.Weapon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.windows.WndOptions;
|
||||
|
||||
public class MissileWeapon extends Weapon {
|
||||
|
||||
private static final String TXT_MISSILES = "Missile weapon";
|
||||
private static final String TXT_YES = "Yes, I know what I'm doing";
|
||||
private static final String TXT_NO = "No, I changed my mind";
|
||||
private static final String TXT_R_U_SURE =
|
||||
"Do you really want to equip it as a melee weapon?";
|
||||
|
||||
{
|
||||
stackable = true;
|
||||
levelKnown = true;
|
||||
defaultAction = AC_THROW;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrayList<String> actions( Hero hero ) {
|
||||
ArrayList<String> actions = super.actions( hero );
|
||||
if (hero.heroClass != HeroClass.HUNTRESS && hero.heroClass != HeroClass.ROGUE) {
|
||||
actions.remove( AC_EQUIP );
|
||||
actions.remove( AC_UNEQUIP );
|
||||
}
|
||||
return actions;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onThrow( int cell ) {
|
||||
Char enemy = Actor.findChar( cell );
|
||||
if (enemy == null || enemy == curUser) {
|
||||
super.onThrow( cell );
|
||||
} else {
|
||||
if (!curUser.shoot( enemy, this )) {
|
||||
miss( cell );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void miss( int cell ) {
|
||||
super.onThrow( cell );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void proc( Char attacker, Char defender, int damage ) {
|
||||
|
||||
super.proc( attacker, defender, damage );
|
||||
|
||||
Hero hero = (Hero)attacker;
|
||||
if (!hero.usingRanged && stackable) {
|
||||
if (quantity == 1) {
|
||||
doUnequip( hero, false );
|
||||
} else {
|
||||
detach( null );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean doEquip( final Hero hero ) {
|
||||
GameScene.show(
|
||||
new WndOptions( TXT_MISSILES, TXT_R_U_SURE, TXT_YES, TXT_NO ) {
|
||||
@Override
|
||||
protected void onSelect(int index) {
|
||||
if (index == 0) {
|
||||
MissileWeapon.super.doEquip( hero );
|
||||
}
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item random() {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isUpgradable() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isIdentified() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String info() {
|
||||
|
||||
StringBuilder info = new StringBuilder( desc() );
|
||||
|
||||
info.append( "\n\nAverage damage of this weapon equals to " + (MIN + (MAX - MIN) / 2) + " points per hit. " );
|
||||
|
||||
if (Dungeon.hero.belongings.backpack.items.contains( this )) {
|
||||
if (STR > Dungeon.hero.STR()) {
|
||||
info.append(
|
||||
"Because of your inadequate strength the accuracy and speed " +
|
||||
"of your attack with this " + name + " is decreased." );
|
||||
}
|
||||
if (STR < Dungeon.hero.STR()) {
|
||||
info.append(
|
||||
"Because of your excess strength the damage " +
|
||||
"of your attack with this " + name + " is increased." );
|
||||
}
|
||||
}
|
||||
|
||||
if (isEquipped( Dungeon.hero )) {
|
||||
info.append( "\n\nYou hold the " + name + " at the ready." );
|
||||
}
|
||||
|
||||
return info.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
/*
|
||||
* 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.weapon.missiles;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||
import com.watabou.utils.Random;
|
||||
|
||||
public class Shuriken extends MissileWeapon {
|
||||
|
||||
{
|
||||
name = "shuriken";
|
||||
image = ItemSpriteSheet.SHURIKEN;
|
||||
|
||||
STR = 13;
|
||||
|
||||
MIN = 2;
|
||||
MAX = 6;
|
||||
|
||||
DLY = 0.5f;
|
||||
}
|
||||
|
||||
public Shuriken() {
|
||||
this( 1 );
|
||||
}
|
||||
|
||||
public Shuriken( int number ) {
|
||||
super();
|
||||
quantity = number;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String desc() {
|
||||
return
|
||||
"Star-shaped pieces of metal with razor-sharp blades do significant damage " +
|
||||
"when they hit a target. They can be thrown at very high rate.";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item random() {
|
||||
quantity = Random.Int( 5, 15 );
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int price() {
|
||||
return 15 * quantity;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* 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.weapon.missiles;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Bleeding;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||
import com.watabou.utils.Random;
|
||||
|
||||
public class Tamahawk extends MissileWeapon {
|
||||
|
||||
{
|
||||
name = "tomahawk";
|
||||
image = ItemSpriteSheet.TOMAHAWK;
|
||||
|
||||
STR = 17;
|
||||
|
||||
MIN = 4;
|
||||
MAX = 20;
|
||||
}
|
||||
|
||||
public Tamahawk() {
|
||||
this( 1 );
|
||||
}
|
||||
|
||||
public Tamahawk( int number ) {
|
||||
super();
|
||||
quantity = number;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void proc( Char attacker, Char defender, int damage ) {
|
||||
super.proc( attacker, defender, damage );
|
||||
Buff.affect( defender, Bleeding.class ).set( damage );
|
||||
}
|
||||
|
||||
@Override
|
||||
public String desc() {
|
||||
return
|
||||
"This throwing axe is not that heavy, but it still " +
|
||||
"requires significant strength to be used effectively.";
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item random() {
|
||||
quantity = Random.Int( 5, 12 );
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int price() {
|
||||
return 20 * quantity;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user