v0.8.1: added in loads of new sound effects, primary for combat

This commit is contained in:
Evan Debenham
2020-06-14 14:03:28 -04:00
parent 3182d3342c
commit 3dc913fadc
97 changed files with 319 additions and 24 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -124,14 +124,25 @@ public class Assets {
public static final String UNLOCK = "sounds/unlock.mp3";
public static final String ITEM = "sounds/item.mp3";
public static final String DEWDROP = "sounds/dewdrop.mp3";
public static final String HIT = "sounds/hit.mp3";
public static final String MISS = "sounds/miss.mp3";
public static final String STEP = "sounds/step.mp3";
public static final String WATER = "sounds/water.mp3";
public static final String GRASS = "sounds/grass.mp3";
public static final String TRAMPLE = "sounds/trample.mp3";
public static final String STURDY = "sounds/sturdy.mp3";
public static final String HIT = "sounds/hit.mp3";
public static final String MISS = "sounds/miss.mp3";
public static final String HIT_SLASH = "sounds/hit_slash.mp3";
public static final String HIT_STAB = "sounds/hit_stab.mp3";
public static final String HIT_CRUSH = "sounds/hit_crush.mp3";
public static final String HIT_MAGIC = "sounds/hit_magic.mp3";
public static final String HIT_STRONG = "sounds/hit_strong.mp3";
public static final String HIT_PARRY = "sounds/hit_parry.mp3";
public static final String ATK_SPIRITBOW = "sounds/atk_spiritbow.mp3";
public static final String ATK_CROSSBOW = "sounds/atk_crossbow.mp3";
public static final String HEALTH_WARN = "sounds/health_warn.mp3";
public static final String HEALTH_CRITICAL = "sounds/health_critical.mp3";
public static final String DESCEND = "sounds/descend.mp3";
public static final String EAT = "sounds/eat.mp3";
public static final String READ = "sounds/read.mp3";
@@ -167,19 +178,27 @@ public class Assets {
public static final String BEE = "sounds/bee.mp3";
public static final String DEGRADE = "sounds/degrade.mp3";
public static final String MIMIC = "sounds/mimic.mp3";
public static final String DEBUFF = "sounds/debuff.mp3";
public static final String CHARGEUP = "sounds/chargeup.mp3";
public static final String GAS = "sounds/gas.mp3";
public static final String CHAINS = "sounds/chains.mp3";
public static final String[] all = new String[]{
CLICK, BADGE, GOLD,
OPEN, UNLOCK, ITEM, DEWDROP, HIT, MISS, STEP, WATER, GRASS, TRAMPLE, STURDY,
OPEN, UNLOCK, ITEM, DEWDROP, STEP, WATER, GRASS, TRAMPLE, STURDY,
HIT, MISS, HIT_SLASH, HIT_STAB, HIT_CRUSH, HIT_MAGIC, HIT_STRONG, HIT_PARRY,
ATK_SPIRITBOW, ATK_CROSSBOW, HEALTH_WARN, HEALTH_CRITICAL,
DESCEND, EAT, READ, LULLABY, DRINK, SHATTER, ZAP, LIGHTNING, LEVELUP, DEATH,
CHALLENGE, CURSED, TRAP, EVOKE, TOMB, ALERT, MELD, BOSS, BLAST, PLANT, RAY, BEACON,
TELEPORT, CHARMS, MASTERY, PUFF, ROCKS, BURNING, FALLING, GHOST, SECRET, BONES,
BEE, DEGRADE, MIMIC
CHALLENGE, CURSED, TRAP, EVOKE, TOMB, ALERT, MELD, BOSS, BLAST, PLANT, RAY, BEACON,
TELEPORT, CHARMS, MASTERY, PUFF, ROCKS, BURNING, FALLING, GHOST, SECRET, BONES,
BEE, DEGRADE, MIMIC, DEBUFF, CHARGEUP, GAS, CHAINS
};
}
public static class Splashes {
public static final String WARRIOR = "splashes/warrior.jpg";
public static final String MAGE = "splashes/mage.jpg";
public static final String ROGUE = "splashes/rogue.jpg";
@@ -187,7 +206,6 @@ public class Assets {
}
public static class Sprites {
public static final String ITEMS = "sprites/items.png";
public static final String ITEM_ICONS = "sprites/item_icons.png";

View File

@@ -187,6 +187,14 @@ public abstract class Char extends Actor {
return true;
}
}
public void hitSound( float pitch ){
Sample.INSTANCE.play(Assets.Sounds.HIT, 1, pitch);
}
public boolean blockSound( float pitch ) {
return false;
}
protected static final String POS = "pos";
protected static final String TAG_HP = "HP";
@@ -244,7 +252,7 @@ public abstract class Char extends Actor {
if (visibleFight) {
enemy.sprite.showStatus( CharSprite.POSITIVE, Messages.get(this, "invulnerable") );
Sample.INSTANCE.play(Assets.Sounds.MISS);
Sample.INSTANCE.play(Assets.Sounds.HIT_PARRY, 1f, Random.Float(0.96f, 1.05f));
}
return false;
@@ -280,7 +288,9 @@ public abstract class Char extends Actor {
effectiveDamage = attackProc( enemy, effectiveDamage );
if (visibleFight) {
Sample.INSTANCE.play( Assets.Sounds.HIT, 1, 1, Random.Float( 0.8f, 1.25f ) );
if (effectiveDamage > 0 || !enemy.blockSound(Random.Float(0.96f, 1.05f))) {
hitSound(Random.Float(0.87f, 1.15f));
}
}
// If the enemy is already dead, interrupt the attack.
@@ -328,7 +338,8 @@ public abstract class Char extends Actor {
if (visibleFight) {
String defense = enemy.defenseVerb();
enemy.sprite.showStatus( CharSprite.NEUTRAL, defense );
//TODO enemy.defenseSound? currently miss plays for monks/crab even when the parry
Sample.INSTANCE.play(Assets.Sounds.MISS);
}

View File

@@ -311,7 +311,8 @@ public class Combo extends Buff implements ActionIndicator.Action {
if (target.buff(FrostImbue.class) != null)
target.buff(FrostImbue.class).proc(enemy);
Sample.INSTANCE.play( Assets.Sounds.HIT, 1, 1, Random.Float( 0.8f, 1.25f ) );
target.hitSound(Random.Float(0.87f, 1.15f));
if (type != finisherType.FURY) Sample.INSTANCE.play(Assets.Sounds.HIT_STRONG);
enemy.sprite.bloodBurstA( target.sprite.center(), dmg );
enemy.sprite.flash();
@@ -348,6 +349,7 @@ public class Combo extends Buff implements ActionIndicator.Action {
});
} else {
detach();
Sample.INSTANCE.play(Assets.Sounds.HIT_STRONG);
ActionIndicator.clearAction(Combo.this);
hero.spendAndNext(hero.attackDelay());
}

View File

@@ -292,7 +292,28 @@ public class Hero extends Char {
public String name(){
return className();
}
@Override
public void hitSound(float pitch) {
if ( belongings.weapon != null ){
belongings.weapon.hitSound(pitch);
} else if (RingOfForce.getBuffedBonus(this, RingOfForce.Force.class) > 0) {
//pitch deepens by 2.5% (additive) per point of strength, down to 75%
super.hitSound( pitch * GameMath.gate( 0.75f, 1.25f - 0.025f*STR(), 1f) );
} else {
super.hitSound(pitch * 1.1f);
}
}
@Override
public boolean blockSound(float pitch) {
if ( belongings.weapon != null && belongings.weapon.defenseFactor(this) >= 4 ){
Sample.INSTANCE.play( Assets.Sounds.HIT_PARRY, 1, pitch);
return true;
}
return super.blockSound(pitch);
}
public void live() {
Buff.affect( this, Regeneration.class );
Buff.affect( this, Hunger.class );
@@ -1081,6 +1102,13 @@ public class Hero extends Char {
if (flashIntensity >= 0.05f){
flashIntensity = Math.min(1/3f, flashIntensity); //cap intensity at 1/3
GameScene.flash( (int)(0xFF*flashIntensity) << 16 );
if (isAlive()) {
if (flashIntensity >= 1/3f) {
Sample.INSTANCE.play(Assets.Sounds.HEALTH_CRITICAL);
} else {
Sample.INSTANCE.play(Assets.Sounds.HEALTH_WARN, flashIntensity * 3f);
}
}
}
}

View File

@@ -21,6 +21,7 @@
package com.shatteredpixel.shatteredpixeldungeon.actors.mobs;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Blob;
@@ -32,6 +33,7 @@ import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
import com.shatteredpixel.shatteredpixeldungeon.sprites.DM200Sprite;
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
import com.watabou.noosa.audio.Sample;
import com.watabou.utils.Bundle;
import com.watabou.utils.Random;
@@ -128,6 +130,7 @@ public class DM200 extends Mob {
}
GLog.w(Messages.get(this, "vent"));
Sample.INSTANCE.play(Assets.Sounds.GAS);
GameScene.add(Blob.seed(trajectory.collisionPos, 100, ToxicGas.class));
}

View File

@@ -21,6 +21,7 @@
package com.shatteredpixel.shatteredpixeldungeon.actors.mobs;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Blob;
@@ -30,6 +31,7 @@ import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
import com.shatteredpixel.shatteredpixeldungeon.sprites.DM201Sprite;
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
import com.watabou.noosa.audio.Sample;
import com.watabou.utils.PathFinder;
import com.watabou.utils.Random;
@@ -101,6 +103,7 @@ public class DM201 extends DM200 {
GameScene.add(Blob.seed(enemy.pos + i, 5, CorrosiveGas.class).setStrength(8));
}
}
Sample.INSTANCE.play(Assets.Sounds.GAS);
}

View File

@@ -158,6 +158,7 @@ public class Goo extends Mob {
GameScene.add(Blob.seed(i, 1, GooWarn.class));
}
pumpedUp++;
Sample.INSTANCE.play( Assets.Sounds.CHARGEUP );
spend( attackDelay() );
@@ -196,6 +197,7 @@ public class Goo extends Mob {
if (Dungeon.level.heroFOV[pos]) {
sprite.showStatus( CharSprite.NEGATIVE, Messages.get(this, "!!!") );
GLog.n( Messages.get(this, "pumpup") );
Sample.INSTANCE.play( Assets.Sounds.CHARGEUP, 1f, 0.8f );
}
spend( attackDelay() );

View File

@@ -21,6 +21,7 @@
package com.shatteredpixel.shatteredpixeldungeon.actors.mobs;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.Ghost;
@@ -30,6 +31,8 @@ import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
import com.shatteredpixel.shatteredpixeldungeon.sprites.GreatCrabSprite;
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
import com.watabou.noosa.audio.Sample;
import com.watabou.utils.Random;
public class GreatCrab extends Crab {
@@ -71,6 +74,7 @@ public class GreatCrab extends Crab {
|| (src instanceof Char && enemy == src))){
GLog.n( Messages.get(this, "noticed") );
sprite.showStatus( CharSprite.NEUTRAL, Messages.get(this, "blocked") );
Sample.INSTANCE.play( Assets.Sounds.HIT_PARRY, 1, Random.Float(0.96f, 1.05f));
} else {
super.damage( dmg, src );
}

View File

@@ -21,6 +21,7 @@
package com.shatteredpixel.shatteredpixeldungeon.actors.mobs;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
@@ -34,6 +35,7 @@ import com.shatteredpixel.shatteredpixeldungeon.mechanics.Ballistica;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
import com.shatteredpixel.shatteredpixeldungeon.sprites.GuardSprite;
import com.watabou.noosa.audio.Sample;
import com.watabou.utils.Bundle;
import com.watabou.utils.Callback;
import com.watabou.utils.Random;
@@ -90,6 +92,8 @@ public class Guard extends Mob {
final int newPosFinal = newPos;
this.target = newPos;
yell( Messages.get(this, "scorpion") );
new Item().throwSound();
Sample.INSTANCE.play( Assets.Sounds.CHAINS );
sprite.parent.add(new Chains(sprite.center(), enemy.sprite.center(), new Callback() {
public void call() {
Actor.addDelayed(new Pushing(enemy, enemy.pos, newPosFinal, new Callback(){

View File

@@ -21,6 +21,7 @@
package com.shatteredpixel.shatteredpixeldungeon.actors.mobs;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.Badges;
import com.shatteredpixel.shatteredpixeldungeon.Challenges;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
@@ -57,8 +58,8 @@ import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.plants.Swiftthistle;
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
import com.watabou.noosa.audio.Sample;
import com.watabou.utils.Bundle;
import com.watabou.utils.GameMath;
import com.watabou.utils.PathFinder;
import com.watabou.utils.Random;
import com.watabou.utils.Reflection;
@@ -546,6 +547,7 @@ public abstract class Mob extends Char {
&& enemy == Dungeon.hero && Dungeon.hero.canSurpriseAttack()) {
Statistics.sneakAttacks++;
Badges.validateRogueUnlock();
Sample.INSTANCE.play(Assets.Sounds.HIT_STRONG);
if (enemy.buff(Preparation.class) != null) {
Wound.hit(this);
} else {

View File

@@ -21,6 +21,7 @@
package com.shatteredpixel.shatteredpixeldungeon.actors.mobs;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Amok;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
@@ -31,6 +32,7 @@ import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.sprites.MonkSprite;
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
import com.watabou.noosa.Image;
import com.watabou.noosa.audio.Sample;
import com.watabou.utils.Bundle;
import com.watabou.utils.Random;
@@ -118,6 +120,7 @@ public class Monk extends Mob {
return super.defenseVerb();
} else {
f.detach();
Sample.INSTANCE.play( Assets.Sounds.HIT_PARRY, 1, Random.Float(0.96f, 1.05f));
focusCooldown = Random.NormalFloat( 6, 7 );
return Messages.get(this, "parried");
}

View File

@@ -354,6 +354,8 @@ public class NewDM300 extends Mob {
}
Sample.INSTANCE.play(Assets.Sounds.GAS);
}
public void onSlamComplete(){

View File

@@ -21,6 +21,7 @@
package com.shatteredpixel.shatteredpixeldungeon.actors.mobs;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
@@ -34,6 +35,7 @@ import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ShamanSprite;
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
import com.watabou.noosa.audio.Sample;
import com.watabou.utils.Random;
//TODO stats on these might be a bit weak
@@ -112,6 +114,7 @@ public abstract class Shaman extends Mob {
if (enemy == Dungeon.hero && Random.Int( 2 ) == 0) {
debuff( enemy );
Sample.INSTANCE.play( Assets.Sounds.DEBUFF );
}
int dmg = Random.NormalIntRange( 6, 15 );

View File

@@ -106,7 +106,7 @@ public class Warlock extends Mob implements Callback {
//TODO would be nice for this to work on ghost/statues too
if (enemy == Dungeon.hero && Random.Int( 2 ) == 0) {
if (enemy.buff( Degrade.class ) == null){
Sample.INSTANCE.play( Assets.Sounds.DEGRADE );
Sample.INSTANCE.play( Assets.Sounds.DEBUFF );
}
Buff.prolong( enemy, Degrade.class, Degrade.DURATION );
}

View File

@@ -507,6 +507,10 @@ public class Item implements Bundlable {
public int throwPos( Hero user, int dst){
return new Ballistica( user.pos, dst, Ballistica.PROJECTILE ).collisionPos;
}
public void throwSound(){
Sample.INSTANCE.play(Assets.Sounds.MISS, 0.6f, 0.6f, 1.5f);
}
public void cast( final Hero user, final int dst ) {
@@ -514,7 +518,7 @@ public class Item implements Bundlable {
user.sprite.zap( cell );
user.busy();
Sample.INSTANCE.play( Assets.Sounds.MISS, 0.6f, 0.6f, 1.5f );
throwSound();
Char enemy = Actor.findChar( cell );
QuickSlotButton.target(enemy);

View File

@@ -21,6 +21,7 @@
package com.shatteredpixel.shatteredpixeldungeon.items;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
@@ -28,12 +29,16 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.utils.BArray;
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
import com.watabou.noosa.audio.Sample;
import com.watabou.utils.PathFinder;
import com.watabou.utils.Random;
abstract public class KindOfWeapon extends EquipableItem {
protected static final float TIME_TO_EQUIP = 1f;
protected String hitSound = Assets.Sounds.HIT;
protected float hitSoundPitch = 1f;
@Override
public boolean isEquipped( Hero hero ) {
@@ -131,5 +136,9 @@ abstract public class KindOfWeapon extends EquipableItem {
public int proc( Char attacker, Char defender, int damage ) {
return damage;
}
public void hitSound( float pitch ){
Sample.INSTANCE.play(hitSound, 1, pitch * hitSoundPitch);
}
}

View File

@@ -21,6 +21,7 @@
package com.shatteredpixel.shatteredpixeldungeon.items.artifacts;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
@@ -39,6 +40,7 @@ import com.shatteredpixel.shatteredpixeldungeon.tiles.DungeonTilemap;
import com.shatteredpixel.shatteredpixeldungeon.ui.QuickSlotButton;
import com.shatteredpixel.shatteredpixeldungeon.utils.BArray;
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
import com.watabou.noosa.audio.Sample;
import com.watabou.utils.Callback;
import com.watabou.utils.PathFinder;
import com.watabou.utils.Random;
@@ -117,6 +119,8 @@ public class EtherealChains extends Artifact {
} else {
chainLocation( chain, curUser );
}
throwSound();
Sample.INSTANCE.play( Assets.Sounds.CHAINS );
}

View File

@@ -48,6 +48,7 @@ public class PotionOfLevitation extends Potion {
splash( cell );
Sample.INSTANCE.play( Assets.Sounds.SHATTER );
Sample.INSTANCE.play( Assets.Sounds.GAS );
}
GameScene.add( Blob.seed( cell, 1000, ConfusionGas.class ) );

View File

@@ -44,6 +44,7 @@ public class PotionOfLiquidFlame extends Potion {
splash( cell );
Sample.INSTANCE.play( Assets.Sounds.SHATTER );
Sample.INSTANCE.play( Assets.Sounds.BURNING );
}
for (int offset : PathFinder.NEIGHBOURS9){

View File

@@ -43,6 +43,7 @@ public class PotionOfParalyticGas extends Potion {
splash( cell );
Sample.INSTANCE.play( Assets.Sounds.SHATTER );
Sample.INSTANCE.play( Assets.Sounds.GAS );
}
GameScene.add( Blob.seed( cell, 1000, ParalyticGas.class ) );

View File

@@ -43,6 +43,7 @@ public class PotionOfToxicGas extends Potion {
splash( cell );
Sample.INSTANCE.play( Assets.Sounds.SHATTER );
Sample.INSTANCE.play( Assets.Sounds.GAS );
}
GameScene.add( Blob.seed( cell, 1000, ToxicGas.class ) );

View File

@@ -42,6 +42,7 @@ public class BlizzardBrew extends Brew {
if (Dungeon.level.heroFOV[cell]) {
splash( cell );
Sample.INSTANCE.play( Assets.Sounds.SHATTER );
Sample.INSTANCE.play( Assets.Sounds.GAS );
}
GameScene.add( Blob.seed( cell, 1000, Blizzard.class ) );

View File

@@ -45,6 +45,7 @@ public class InfernalBrew extends Brew {
splash( cell );
Sample.INSTANCE.play( Assets.Sounds.SHATTER );
Sample.INSTANCE.play( Assets.Sounds.GAS );
}
GameScene.add( Blob.seed( cell, 1000, Inferno.class ) );

View File

@@ -44,6 +44,7 @@ public class ShockingBrew extends Brew {
if (Dungeon.level.heroFOV[cell]) {
splash( cell );
Sample.INSTANCE.play( Assets.Sounds.SHATTER );
Sample.INSTANCE.play(Assets.Sounds.LIGHTNING);
}
PathFinder.buildDistanceMap( cell, BArray.not( Dungeon.level.solid, null ), 2 );
for (int i = 0; i < PathFinder.distance.length; i++) {
@@ -51,7 +52,6 @@ public class ShockingBrew extends Brew {
GameScene.add(Blob.seed(i, 20, Electricity.class));
}
}
Sample.INSTANCE.play(Assets.Sounds.LIGHTNING);
}
@Override

View File

@@ -43,6 +43,7 @@ public class PotionOfCorrosiveGas extends ExoticPotion {
splash( cell );
Sample.INSTANCE.play( Assets.Sounds.SHATTER );
Sample.INSTANCE.play( Assets.Sounds.GAS );
}
GameScene.add( Blob.seed( cell, 200, CorrosiveGas.class ).setStrength( 1 + Dungeon.depth/5));

View File

@@ -43,6 +43,7 @@ public class PotionOfShroudingFog extends ExoticPotion {
splash( cell );
Sample.INSTANCE.play( Assets.Sounds.SHATTER );
Sample.INSTANCE.play( Assets.Sounds.GAS );
}
GameScene.add( Blob.seed( cell, 1000, SmokeScreen.class ) );

View File

@@ -43,6 +43,7 @@ public class PotionOfStormClouds extends ExoticPotion {
splash( cell );
Sample.INSTANCE.play( Assets.Sounds.SHATTER );
Sample.INSTANCE.play( Assets.Sounds.GAS );
}
GameScene.add( Blob.seed( cell, 1000, StormCloud.class ) );

View File

@@ -45,8 +45,9 @@ public class ScrollOfRecharging extends Scroll {
Buff.affect(curUser, Recharging.class, Recharging.DURATION);
charge(curUser);
Sample.INSTANCE.play( Assets.Sounds.READ );
Sample.INSTANCE.play( Assets.Sounds.CHARGEUP );
Invisibility.dispel();
GLog.i( Messages.get(this, "surge") );

View File

@@ -41,8 +41,9 @@ public class ScrollOfMysticalEnergy extends ExoticScroll {
//append buff
Buff.affect(curUser, ArtifactRecharge.class).set( 30 );
Sample.INSTANCE.play( Assets.Sounds.READ );
Sample.INSTANCE.play( Assets.Sounds.CHARGEUP );
Invisibility.dispel();
SpellSprite.show( curUser, SpellSprite.CHARGE );

View File

@@ -21,6 +21,7 @@
package com.shatteredpixel.shatteredpixeldungeon.items.spells;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.ArtifactRecharge;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Recharging;
@@ -32,6 +33,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.exotic.ScrollOfMys
import com.shatteredpixel.shatteredpixeldungeon.items.wands.CursedWand;
import com.shatteredpixel.shatteredpixeldungeon.mechanics.Ballistica;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
import com.watabou.noosa.audio.Sample;
import com.watabou.utils.Callback;
public class WildEnergy extends TargetedSpell {
@@ -51,6 +53,8 @@ public class WildEnergy extends TargetedSpell {
CursedWand.cursedZap(this, hero, bolt, new Callback() {
@Override
public void call() {
Sample.INSTANCE.play( Assets.Sounds.LIGHTNING );
Sample.INSTANCE.play( Assets.Sounds.CHARGEUP );
ScrollOfRecharging.charge(hero);
hero.belongings.charge(1f);

View File

@@ -31,6 +31,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Ooze;
import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter;
import com.shatteredpixel.shatteredpixeldungeon.effects.MagicMissile;
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.CorrosionParticle;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.MagesStaff;
import com.shatteredpixel.shatteredpixeldungeon.mechanics.Ballistica;
@@ -53,9 +54,10 @@ public class WandOfCorrosion extends Wand {
@Override
protected void onZap(Ballistica bolt) {
CorrosiveGas gas = Blob.seed(bolt.collisionPos, 50 + 10 * buffedLvl(), CorrosiveGas.class);
CellEmitter.center(bolt.collisionPos).burst( CorrosionParticle.SPLASH, 10 );
CellEmitter.get(bolt.collisionPos).burst(Speck.factory(Speck.CORROSION), 10 );
gas.setStrength(2 + buffedLvl());
GameScene.add(gas);
Sample.INSTANCE.play(Assets.Sounds.GAS);
for (int i : PathFinder.NEIGHBOURS9) {
Char ch = Actor.findChar(bolt.collisionPos + i);

View File

@@ -180,6 +180,7 @@ public class WandOfCorruption extends Wand {
}
processSoulMark(ch, chargesPerCast());
Sample.INSTANCE.play( Assets.Sounds.HIT_MAGIC, 1, 0.8f * Random.Float(0.87f, 1.15f) );
} else {
Dungeon.level.pressCell(bolt.collisionPos);

View File

@@ -78,6 +78,7 @@ public class WandOfFrost extends DamageWand {
processSoulMark(ch, chargesPerCast());
ch.damage(damage, this);
Sample.INSTANCE.play( Assets.Sounds.HIT_MAGIC, 1, 1.1f * Random.Float(0.87f, 1.15f) );
if (ch.isAlive()){
if (Dungeon.level.water[ch.pos])

View File

@@ -94,6 +94,7 @@ public class WandOfLivingEarth extends DamageWand {
guardian.sprite.centerEmitter().burst(MagicMissile.EarthParticle.ATTRACT, 8 + buffedLvl() / 2);
guardian.setInfo(curUser, buffedLvl(), armorToAdd);
processSoulMark(guardian, chargesPerCast());
Sample.INSTANCE.play( Assets.Sounds.HIT_MAGIC, 1, 0.9f * Random.Float(0.87f, 1.15f) );
//shooting the guardian at a location
} else if ( guardian == null && buff != null && buff.armor >= buff.armorToGuardian()){
@@ -143,6 +144,7 @@ public class WandOfLivingEarth extends DamageWand {
guardian.sprite.centerEmitter().burst(MagicMissile.EarthParticle.ATTRACT, 8 + buffedLvl()/2);
buff.detach();
Sample.INSTANCE.play( Assets.Sounds.HIT_MAGIC, 1, 0.9f * Random.Float(0.87f, 1.15f) );
//shooting at a location/enemy with no guardian being shot
} else {
@@ -153,6 +155,7 @@ public class WandOfLivingEarth extends DamageWand {
processSoulMark(ch, chargesPerCast());
ch.damage(damage, this);
Sample.INSTANCE.play( Assets.Sounds.HIT_MAGIC, 1, 0.8f * Random.Float(0.87f, 1.15f) );
if (guardian == null) {
curUser.sprite.centerEmitter().burst(MagicMissile.EarthParticle.ATTRACT, 8 + buffedLvl() / 2);

View File

@@ -21,6 +21,7 @@
package com.shatteredpixel.shatteredpixeldungeon.items.wands;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
@@ -30,7 +31,13 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Recharging;
import com.shatteredpixel.shatteredpixeldungeon.effects.SpellSprite;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.MagesStaff;
import com.shatteredpixel.shatteredpixeldungeon.mechanics.Ballistica;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
import com.shatteredpixel.shatteredpixeldungeon.ui.QuickSlotButton;
import com.watabou.noosa.Image;
import com.watabou.noosa.audio.Sample;
import com.watabou.utils.Random;
public class WandOfMagicMissile extends DamageWand {
@@ -54,6 +61,7 @@ public class WandOfMagicMissile extends DamageWand {
processSoulMark(ch, chargesPerCast());
ch.damage(damageRoll(), this);
Sample.INSTANCE.play( Assets.Sounds.HIT_MAGIC, 1, Random.Float(0.87f, 1.15f) );
ch.sprite.burst(0xFFFFFFFF, buffedLvl() / 2 + 2);

View File

@@ -274,7 +274,12 @@ public class SpiritBow extends Weapon {
if (sniperSpecial && SpiritBow.this.augment != Augment.SPEED) sniperSpecial = false;
}
}
@Override
public void throwSound() {
Sample.INSTANCE.play( Assets.Sounds.ATK_SPIRITBOW );
}
int flurryCount = -1;
@Override

View File

@@ -21,6 +21,7 @@
package com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob;
@@ -31,6 +32,8 @@ public class AssassinsBlade extends MeleeWeapon {
{
image = ItemSpriteSheet.ASSASSINS_BLADE;
hitSound = Assets.Sounds.HIT_STAB;
hitSoundPitch = 0.9f;
tier = 4;
}

View File

@@ -21,12 +21,15 @@
package com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
public class BattleAxe extends MeleeWeapon {
{
image = ItemSpriteSheet.BATTLE_AXE;
hitSound = Assets.Sounds.HIT_SLASH;
hitSoundPitch = 0.9f;
tier = 4;
ACC = 1.24f; //24% boost to accuracy

View File

@@ -21,12 +21,15 @@
package com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
public class Crossbow extends MeleeWeapon {
{
image = ItemSpriteSheet.CROSSBOW;
hitSound = Assets.Sounds.HIT;
hitSoundPitch = 1f;
//check Dart.class for additional properties

View File

@@ -21,6 +21,7 @@
package com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob;
@@ -31,6 +32,8 @@ public class Dagger extends MeleeWeapon {
{
image = ItemSpriteSheet.DAGGER;
hitSound = Assets.Sounds.HIT_STAB;
hitSoundPitch = 1.1f;
tier = 1;

View File

@@ -21,6 +21,7 @@
package com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob;
@@ -31,6 +32,8 @@ public class Dirk extends MeleeWeapon {
{
image = ItemSpriteSheet.DIRK;
hitSound = Assets.Sounds.HIT_STAB;
hitSoundPitch = 1f;
tier = 2;
}

View File

@@ -21,12 +21,15 @@
package com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
public class Flail extends MeleeWeapon {
{
image = ItemSpriteSheet.FLAIL;
hitSound = Assets.Sounds.HIT_CRUSH;
hitSoundPitch = 0.8f;
tier = 4;
ACC = 0.9f; //0.9x accuracy

View File

@@ -21,6 +21,7 @@
package com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
@@ -28,6 +29,8 @@ public class Gauntlet extends MeleeWeapon {
{
image = ItemSpriteSheet.GAUNTLETS;
hitSound = Assets.Sounds.HIT_CRUSH;
hitSoundPitch = 1.2f;
tier = 5;
DLY = 0.5f; //2x speed

View File

@@ -21,12 +21,15 @@
package com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
public class Glaive extends MeleeWeapon {
{
image = ItemSpriteSheet.GLAIVE;
hitSound = Assets.Sounds.HIT_SLASH;
hitSoundPitch = 0.8f;
tier = 5;
DLY = 1.5f; //0.67x speed

View File

@@ -21,12 +21,15 @@
package com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
public class Gloves extends MeleeWeapon {
{
image = ItemSpriteSheet.GLOVES;
hitSound = Assets.Sounds.HIT;
hitSoundPitch = 1.3f;
tier = 1;
DLY = 0.5f; //2x speed

View File

@@ -21,12 +21,15 @@
package com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
public class Greataxe extends MeleeWeapon {
{
image = ItemSpriteSheet.GREATAXE;
hitSound = Assets.Sounds.HIT_SLASH;
hitSoundPitch = 1f;
tier = 5;
}

View File

@@ -21,12 +21,15 @@
package com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
public class Greatsword extends MeleeWeapon {
{
image = ItemSpriteSheet.GREATSWORD;
hitSound = Assets.Sounds.HIT_SLASH;
hitSoundPitch = 1f;
tier=5;
}

View File

@@ -21,12 +21,15 @@
package com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
public class HandAxe extends MeleeWeapon {
{
image = ItemSpriteSheet.HAND_AXE;
hitSound = Assets.Sounds.HIT_SLASH;
hitSoundPitch = 1f;
tier = 2;
ACC = 1.32f; //32% boost to accuracy

View File

@@ -21,12 +21,15 @@
package com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
public class Longsword extends MeleeWeapon {
{
image = ItemSpriteSheet.LONGSWORD;
hitSound = Assets.Sounds.HIT_SLASH;
hitSoundPitch = 1f;
tier = 4;
}

View File

@@ -21,12 +21,15 @@
package com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
public class Mace extends MeleeWeapon {
{
image = ItemSpriteSheet.MACE;
hitSound = Assets.Sounds.HIT_CRUSH;
hitSoundPitch = 1f;
tier = 3;
ACC = 1.28f; //28% boost to accuracy

View File

@@ -64,6 +64,8 @@ public class MagesStaff extends MeleeWeapon {
{
image = ItemSpriteSheet.MAGES_STAFF;
hitSound = Assets.Sounds.HIT;
hitSoundPitch = 1.1f;
tier = 1;

View File

@@ -21,6 +21,7 @@
package com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
@@ -28,6 +29,8 @@ public class Quarterstaff extends MeleeWeapon {
{
image = ItemSpriteSheet.QUARTERSTAFF;
hitSound = Assets.Sounds.HIT_CRUSH;
hitSoundPitch = 1f;
tier = 2;
}

View File

@@ -21,6 +21,7 @@
package com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
@@ -29,6 +30,8 @@ public class RoundShield extends MeleeWeapon {
{
image = ItemSpriteSheet.ROUND_SHIELD;
hitSound = Assets.Sounds.HIT;
hitSoundPitch = 1f;
tier = 3;
}

View File

@@ -21,12 +21,15 @@
package com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
public class RunicBlade extends MeleeWeapon {
{
image = ItemSpriteSheet.RUNIC_BLADE;
hitSound = Assets.Sounds.HIT_SLASH;
hitSoundPitch = 1f;
tier = 4;
}

View File

@@ -21,6 +21,7 @@
package com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
@@ -28,6 +29,8 @@ public class Sai extends MeleeWeapon {
{
image = ItemSpriteSheet.SAI;
hitSound = Assets.Sounds.HIT_STAB;
hitSoundPitch = 1.3f;
tier = 3;
DLY = 0.5f; //2x speed

View File

@@ -21,12 +21,15 @@
package com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
public class Scimitar extends MeleeWeapon {
{
image = ItemSpriteSheet.SCIMITAR;
hitSound = Assets.Sounds.HIT_SLASH;
hitSoundPitch = 1.2f;
tier = 3;
DLY = 0.8f; //1.25x speed

View File

@@ -21,12 +21,15 @@
package com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
public class Shortsword extends MeleeWeapon {
{
image = ItemSpriteSheet.SHORTSWORD;
hitSound = Assets.Sounds.HIT_SLASH;
hitSoundPitch = 1.1f;
tier = 2;
}

View File

@@ -21,12 +21,15 @@
package com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
public class Spear extends MeleeWeapon {
{
image = ItemSpriteSheet.SPEAR;
hitSound = Assets.Sounds.HIT_STAB;
hitSoundPitch = 0.9f;
tier = 2;
DLY = 1.5f; //0.67x speed

View File

@@ -21,12 +21,15 @@
package com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
public class Sword extends MeleeWeapon {
{
image = ItemSpriteSheet.SWORD;
hitSound = Assets.Sounds.HIT_SLASH;
hitSoundPitch = 1f;
tier = 3;
}

View File

@@ -21,12 +21,15 @@
package com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
public class WarHammer extends MeleeWeapon {
{
image = ItemSpriteSheet.WAR_HAMMER;
hitSound = Assets.Sounds.HIT_CRUSH;
hitSoundPitch = 1f;
tier = 5;
ACC = 1.20f; //20% boost to accuracy

View File

@@ -21,12 +21,15 @@
package com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
public class Whip extends MeleeWeapon {
{
image = ItemSpriteSheet.WHIP;
hitSound = Assets.Sounds.HIT;
hitSoundPitch = 1.1f;
tier = 3;
RCH = 3; //lots of extra reach

View File

@@ -21,12 +21,15 @@
package com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
public class WornShortsword extends MeleeWeapon {
{
image = ItemSpriteSheet.WORN_SHORTSWORD;
hitSound = Assets.Sounds.HIT_SLASH;
hitSoundPitch = 1.1f;
tier = 1;

View File

@@ -21,6 +21,7 @@
package com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Cripple;
@@ -30,6 +31,8 @@ public class Bolas extends MissileWeapon {
{
image = ItemSpriteSheet.BOLAS;
hitSound = Assets.Sounds.HIT;
hitSoundPitch = 1f;
tier = 3;
baseUses = 5;

View File

@@ -21,6 +21,7 @@
package com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Piranha;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
@@ -29,6 +30,8 @@ public class FishingSpear extends MissileWeapon {
{
image = ItemSpriteSheet.FISHING_SPEAR;
hitSound = Assets.Sounds.HIT_STAB;
hitSoundPitch = 1.1f;
tier = 2;
}

View File

@@ -45,7 +45,12 @@ public class ForceCube extends MissileWeapon {
sticky = false;
}
@Override
public void hitSound(float pitch) {
//no hitsound as it never hits enemies directly
}
@Override
protected void onThrow(int cell) {
if (Dungeon.level.pit[cell]){

View File

@@ -21,6 +21,7 @@
package com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
@@ -36,6 +37,8 @@ public class HeavyBoomerang extends MissileWeapon {
{
image = ItemSpriteSheet.BOOMERANG;
hitSound = Assets.Sounds.HIT_CRUSH;
hitSoundPitch = 1f;
tier = 4;
sticky = false;

View File

@@ -21,12 +21,15 @@
package com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
public class Javelin extends MissileWeapon {
{
image = ItemSpriteSheet.JAVELIN;
hitSound = Assets.Sounds.HIT_STAB;
hitSoundPitch = 1f;
tier = 4;
}

View File

@@ -21,6 +21,7 @@
package com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
@@ -32,6 +33,8 @@ public class Kunai extends MissileWeapon {
{
image = ItemSpriteSheet.KUNAI;
hitSound = Assets.Sounds.HIT_STAB;
hitSoundPitch = 1.1f;
tier = 3;
baseUses = 5;

View File

@@ -21,6 +21,7 @@
package com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
@@ -29,6 +30,8 @@ public class Shuriken extends MissileWeapon {
{
image = ItemSpriteSheet.SHURIKEN;
hitSound = Assets.Sounds.HIT_STAB;
hitSoundPitch = 1.2f;
tier = 2;
baseUses = 5;

View File

@@ -21,12 +21,15 @@
package com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
public class ThrowingClub extends MissileWeapon {
{
image = ItemSpriteSheet.THROWING_CLUB;
hitSound = Assets.Sounds.HIT_CRUSH;
hitSoundPitch = 1.1f;
tier = 2;
baseUses = 15;

View File

@@ -21,12 +21,15 @@
package com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
public class ThrowingHammer extends MissileWeapon {
{
image = ItemSpriteSheet.THROWING_HAMMER;
hitSound = Assets.Sounds.HIT_CRUSH;
hitSoundPitch = 0.8f;
tier = 5;
baseUses = 15;

View File

@@ -21,6 +21,7 @@
package com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
@@ -32,6 +33,8 @@ public class ThrowingKnife extends MissileWeapon {
{
image = ItemSpriteSheet.THROWING_KNIFE;
hitSound = Assets.Sounds.HIT_SLASH;
hitSoundPitch = 1.2f;
bones = false;

View File

@@ -21,12 +21,15 @@
package com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
public class ThrowingSpear extends MissileWeapon {
{
image = ItemSpriteSheet.THROWING_SPEAR;
hitSound = Assets.Sounds.HIT_STAB;
hitSoundPitch = 1f;
tier = 3;
}

View File

@@ -21,12 +21,15 @@
package com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
public class ThrowingStone extends MissileWeapon {
{
image = ItemSpriteSheet.THROWING_STONE;
hitSound = Assets.Sounds.HIT;
hitSoundPitch = 1.1f;
bones = false;

View File

@@ -21,6 +21,7 @@
package com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Bleeding;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
@@ -30,6 +31,8 @@ public class Tomahawk extends MissileWeapon {
{
image = ItemSpriteSheet.TOMAHAWK;
hitSound = Assets.Sounds.HIT_SLASH;
hitSoundPitch = 0.9f;
tier = 4;
baseUses = 5;

View File

@@ -21,12 +21,15 @@
package com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
public class Trident extends MissileWeapon {
{
image = ItemSpriteSheet.TRIDENT;
hitSound = Assets.Sounds.HIT_SLASH;
hitSoundPitch = 0.9f;
tier = 5;
}

View File

@@ -21,6 +21,7 @@
package com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles.darts;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.MagicImmune;
@@ -34,6 +35,7 @@ import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
import com.shatteredpixel.shatteredpixeldungeon.windows.WndBag;
import com.shatteredpixel.shatteredpixeldungeon.windows.WndOptions;
import com.watabou.noosa.audio.Sample;
import java.util.ArrayList;
@@ -41,6 +43,8 @@ public class Dart extends MissileWeapon {
{
image = ItemSpriteSheet.DART;
hitSound = Assets.Sounds.HIT_STAB;
hitSoundPitch = 1.3f;
tier = 1;
@@ -122,6 +126,16 @@ public class Dart extends MissileWeapon {
updateCrossbow();
super.onThrow(cell);
}
@Override
public void throwSound() {
updateCrossbow();
if (bow != null) {
Sample.INSTANCE.play(Assets.Sounds.ATK_CROSSBOW);
} else {
super.throwSound();
}
}
@Override
public String info() {

View File

@@ -21,12 +21,14 @@
package com.shatteredpixel.shatteredpixeldungeon.levels.traps;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Blob;
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Fire;
import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter;
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.FlameParticle;
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
import com.watabou.noosa.audio.Sample;
import com.watabou.utils.PathFinder;
public class BurningTrap extends Trap {
@@ -45,6 +47,6 @@ public class BurningTrap extends Trap {
CellEmitter.get( pos+i ).burst( FlameParticle.FACTORY, 5 );
}
}
Sample.INSTANCE.play(Assets.Sounds.BURNING);
}
}

View File

@@ -21,10 +21,12 @@
package com.shatteredpixel.shatteredpixeldungeon.levels.traps;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Blob;
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.ConfusionGas;
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
import com.watabou.noosa.audio.Sample;
public class ConfusionTrap extends Trap {
@@ -37,6 +39,7 @@ public class ConfusionTrap extends Trap {
public void activate() {
GameScene.add(Blob.seed(pos, 300 + 20 * Dungeon.depth, ConfusionGas.class));
Sample.INSTANCE.play(Assets.Sounds.GAS);
}
}

View File

@@ -21,10 +21,12 @@
package com.shatteredpixel.shatteredpixeldungeon.levels.traps;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Blob;
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.CorrosiveGas;
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
import com.watabou.noosa.audio.Sample;
public class CorrosionTrap extends Trap {
@@ -37,6 +39,7 @@ public class CorrosionTrap extends Trap {
public void activate() {
CorrosiveGas corrosiveGas = Blob.seed(pos, 80 + 5 * Dungeon.depth, CorrosiveGas.class);
Sample.INSTANCE.play(Assets.Sounds.GAS);
corrosiveGas.setStrength(1+Dungeon.depth/4);

View File

@@ -21,10 +21,12 @@
package com.shatteredpixel.shatteredpixeldungeon.levels.traps;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Blob;
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.ToxicGas;
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
import com.watabou.noosa.audio.Sample;
public class ToxicTrap extends Trap{
@@ -37,6 +39,7 @@ public class ToxicTrap extends Trap{
public void activate() {
GameScene.add( Blob.seed( pos, 300 + 20 * Dungeon.depth, ToxicGas.class ) );
Sample.INSTANCE.play(Assets.Sounds.GAS);
}
}

View File

@@ -29,6 +29,7 @@ import com.shatteredpixel.shatteredpixeldungeon.effects.Beam;
import com.shatteredpixel.shatteredpixeldungeon.effects.MagicMissile;
import com.shatteredpixel.shatteredpixeldungeon.tiles.DungeonTilemap;
import com.watabou.noosa.TextureFilm;
import com.watabou.noosa.audio.Sample;
import com.watabou.noosa.particles.Emitter;
public class EyeSprite extends MobSprite {
@@ -104,6 +105,7 @@ public class EyeSprite extends MobSprite {
public void charge( int pos ){
turnTo(ch.pos, pos);
play(charging);
if (visible) Sample.INSTANCE.play( Assets.Sounds.CHARGEUP );
}
@Override

View File

@@ -24,6 +24,8 @@ package com.shatteredpixel.shatteredpixeldungeon.sprites;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Necromancer;
import com.watabou.noosa.TextureFilm;
import com.watabou.noosa.audio.Sample;
import com.watabou.utils.Callback;
public class NecromancerSprite extends MobSprite {
@@ -58,7 +60,15 @@ public class NecromancerSprite extends MobSprite {
public void charge(){
play(charging);
}
@Override
public void zap(int cell) {
super.zap(cell);
if (visible && ch instanceof Necromancer && ((Necromancer) ch).summoning){
Sample.INSTANCE.play( Assets.Sounds.CHARGEUP, 1f, 0.8f );
}
}
@Override
public void onComplete(Animation anim) {
super.onComplete(anim);