v0.3.5: added support for longer reach weapons
This commit is contained in:
@@ -20,9 +20,6 @@
|
||||
*/
|
||||
package com.shatteredpixel.shatteredpixeldungeon.items;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
@@ -97,6 +94,10 @@ abstract public class KindOfWeapon extends EquipableItem {
|
||||
public float speedFactor( Hero hero ) {
|
||||
return 1f;
|
||||
}
|
||||
|
||||
public int reachFactor( Hero hero ){
|
||||
return 1;
|
||||
}
|
||||
|
||||
public void proc( Char attacker, Char defender, int damage ) {
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
*/
|
||||
package com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||
|
||||
public class Spear extends MeleeWeapon {
|
||||
@@ -27,7 +28,12 @@ public class Spear extends MeleeWeapon {
|
||||
{
|
||||
image = ItemSpriteSheet.SPEAR;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int reachFactor(Hero hero) {
|
||||
return 2;
|
||||
}
|
||||
|
||||
public Spear() {
|
||||
super( 2, 1f, 1.5f );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user