v2.0.0: added a defensive T1 talent for the duelist
This commit is contained in:
@@ -801,6 +801,10 @@ actors.hero.talent.strengthening_meal.desc=_+1:_ Eating food grants the Duelist
|
|||||||
actors.hero.talent.adventurers_intuition.title=adventurer's intuition
|
actors.hero.talent.adventurers_intuition.title=adventurer's intuition
|
||||||
actors.hero.talent.adventurers_intuition.desc=_+1:_ The Duelist identifies weapons _2.5x faster_ and armor _1.75x faster_.\n\n_+2:_ The Duelist identifies weapons _when she equips them_ and armor _2.5x faster_.
|
actors.hero.talent.adventurers_intuition.desc=_+1:_ The Duelist identifies weapons _2.5x faster_ and armor _1.75x faster_.\n\n_+2:_ The Duelist identifies weapons _when she equips them_ and armor _2.5x faster_.
|
||||||
|
|
||||||
|
actors.hero.talent.aggressive_barrier.title=aggressive barrier
|
||||||
|
actors.hero.talent.aggressive_barrier.desc=_+1:_ The Duelist gain 2 shielding whenever she uses a weapon ability and is below _33% health._\n\n_+2:_ The Duelist gain 2 shielding whenever she uses a weapon ability and is below _50% health._
|
||||||
|
actors.hero.talent.aggressive_barrier.meta_desc=_If this talent is gained by a different hero_ it will instead grant shielding when making a melee attack, with a 30 turn cooldown.
|
||||||
|
|
||||||
#universal
|
#universal
|
||||||
actors.hero.talent.heroic_energy.title=heroic energy
|
actors.hero.talent.heroic_energy.title=heroic energy
|
||||||
actors.hero.talent.heroic_energy.rat_title=ratroic energy
|
actors.hero.talent.heroic_energy.rat_title=ratroic energy
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.AnkhInvulnerability
|
|||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.AscensionChallenge;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.AscensionChallenge;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Awareness;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Awareness;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Barkskin;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Barkskin;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Barrier;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Berserk;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Berserk;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Bless;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Bless;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||||
@@ -1161,6 +1162,13 @@ public class Hero extends Char {
|
|||||||
|
|
||||||
if (enemy.isAlive() && canAttack( enemy ) && !isCharmedBy( enemy ) && enemy.invisible == 0) {
|
if (enemy.isAlive() && canAttack( enemy ) && !isCharmedBy( enemy ) && enemy.invisible == 0) {
|
||||||
|
|
||||||
|
if (heroClass != HeroClass.DUELIST
|
||||||
|
&& hasTalent(Talent.AGGRESSIVE_BARRIER)
|
||||||
|
&& buff(Talent.AggressiveBarrierCooldown.class) == null
|
||||||
|
&& (HP / (float)HT) < 0.167f*(1+pointsInTalent(Talent.AGGRESSIVE_BARRIER))){
|
||||||
|
Buff.affect(this, Barrier.class).setShield(2);
|
||||||
|
Buff.affect(this, Talent.AggressiveBarrierCooldown.class, 30f);
|
||||||
|
}
|
||||||
sprite.attack( enemy.pos );
|
sprite.attack( enemy.pos );
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -147,7 +147,7 @@ public enum Talent {
|
|||||||
EAGLE_EYE(119, 4), GO_FOR_THE_EYES(120, 4), SWIFT_SPIRIT(121, 4),
|
EAGLE_EYE(119, 4), GO_FOR_THE_EYES(120, 4), SWIFT_SPIRIT(121, 4),
|
||||||
|
|
||||||
//Duelist T1
|
//Duelist T1
|
||||||
STRENGTHENING_MEAL(128), ADVENTURERS_INTUITION(129), DUELIST_T1_3(130), DUELIST_T1_4(131),
|
STRENGTHENING_MEAL(128), ADVENTURERS_INTUITION(129), DUELIST_T1_3(130), AGGRESSIVE_BARRIER(131),
|
||||||
//Duelist T2
|
//Duelist T2
|
||||||
DUELIST_T2_1(132), DUELIST_T2_2(133), DUELIST_T2_3(134), DUELIST_T2_4(135), DUELIST_T2_5(136),
|
DUELIST_T2_1(132), DUELIST_T2_2(133), DUELIST_T2_3(134), DUELIST_T2_4(135), DUELIST_T2_5(136),
|
||||||
//Duelist T3
|
//Duelist T3
|
||||||
@@ -227,6 +227,7 @@ public enum Talent {
|
|||||||
public float iconFadePercent() { return Math.max(0, visualcooldown() / 20); }
|
public float iconFadePercent() { return Math.max(0, visualcooldown() / 20); }
|
||||||
};
|
};
|
||||||
public static class SpiritBladesTracker extends FlavourBuff{};
|
public static class SpiritBladesTracker extends FlavourBuff{};
|
||||||
|
public static class AggressiveBarrierCooldown extends FlavourBuff{};
|
||||||
|
|
||||||
int icon;
|
int icon;
|
||||||
int maxPoints;
|
int maxPoints;
|
||||||
@@ -594,7 +595,7 @@ public enum Talent {
|
|||||||
Collections.addAll(tierTalents, NATURES_BOUNTY, SURVIVALISTS_INTUITION, FOLLOWUP_STRIKE, NATURES_AID);
|
Collections.addAll(tierTalents, NATURES_BOUNTY, SURVIVALISTS_INTUITION, FOLLOWUP_STRIKE, NATURES_AID);
|
||||||
break;
|
break;
|
||||||
case DUELIST:
|
case DUELIST:
|
||||||
Collections.addAll(tierTalents, STRENGTHENING_MEAL, ADVENTURERS_INTUITION, DUELIST_T1_3, DUELIST_T1_4);
|
Collections.addAll(tierTalents, STRENGTHENING_MEAL, ADVENTURERS_INTUITION, DUELIST_T1_3, AGGRESSIVE_BARRIER);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
for (Talent talent : tierTalents){
|
for (Talent talent : tierTalents){
|
||||||
|
|||||||
+1
-4
@@ -36,10 +36,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Spinner;
|
|||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Swarm;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Swarm;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter;
|
import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
|
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.Scroll;
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.Weapon;
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.MeleeWeapon;
|
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.MeleeWeapon;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.RunicBlade;
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
|
import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain;
|
import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||||
@@ -204,13 +201,13 @@ public class Pickaxe extends MeleeWeapon {
|
|||||||
|| enemy instanceof Scorpio) {
|
|| enemy instanceof Scorpio) {
|
||||||
damageMulti = 2f;
|
damageMulti = 2f;
|
||||||
}
|
}
|
||||||
|
onAbilityUsed(hero);
|
||||||
if (hero.attack(enemy, damageMulti, 0, Char.INFINITE_ACCURACY)) {
|
if (hero.attack(enemy, damageMulti, 0, Char.INFINITE_ACCURACY)) {
|
||||||
if (enemy.isAlive()) {
|
if (enemy.isAlive()) {
|
||||||
Buff.affect(enemy, Vulnerable.class, 3f);
|
Buff.affect(enemy, Vulnerable.class, 3f);
|
||||||
}
|
}
|
||||||
Sample.INSTANCE.play(Assets.Sounds.HIT_STRONG);
|
Sample.INSTANCE.play(Assets.Sounds.HIT_STRONG);
|
||||||
}
|
}
|
||||||
onAbilityUsed(hero);
|
|
||||||
hero.spendAndNext(hero.attackDelay());
|
hero.spendAndNext(hero.attackDelay());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
+1
-2
@@ -37,7 +37,6 @@ import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
|||||||
import com.shatteredpixel.shatteredpixeldungeon.utils.BArray;
|
import com.shatteredpixel.shatteredpixeldungeon.utils.BArray;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
||||||
import com.watabou.noosa.audio.Sample;
|
import com.watabou.noosa.audio.Sample;
|
||||||
import com.watabou.utils.Callback;
|
|
||||||
import com.watabou.utils.PathFinder;
|
import com.watabou.utils.PathFinder;
|
||||||
import com.watabou.utils.Random;
|
import com.watabou.utils.Random;
|
||||||
|
|
||||||
@@ -111,9 +110,9 @@ public class Dagger extends MeleeWeapon {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wep.onAbilityUsed(hero);
|
||||||
Buff.affect(hero, Invisibility.class, Math.max(1, 1/hero.speed()));
|
Buff.affect(hero, Invisibility.class, Math.max(1, 1/hero.speed()));
|
||||||
hero.spendAndNext(1/hero.speed());
|
hero.spendAndNext(1/hero.speed());
|
||||||
wep.onAbilityUsed(hero);
|
|
||||||
|
|
||||||
Dungeon.hero.sprite.turnTo( Dungeon.hero.pos, target);
|
Dungeon.hero.sprite.turnTo( Dungeon.hero.pos, target);
|
||||||
Dungeon.hero.pos = target;
|
Dungeon.hero.pos = target;
|
||||||
|
|||||||
+1
-2
@@ -25,7 +25,6 @@ import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
|||||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||||
@@ -79,10 +78,10 @@ public class Greataxe extends MeleeWeapon {
|
|||||||
hero.sprite.attack(enemy.pos, new Callback() {
|
hero.sprite.attack(enemy.pos, new Callback() {
|
||||||
@Override
|
@Override
|
||||||
public void call() {
|
public void call() {
|
||||||
|
onAbilityUsed(hero);
|
||||||
if (hero.attack(enemy, 1.5f, 0, Char.INFINITE_ACCURACY)){
|
if (hero.attack(enemy, 1.5f, 0, Char.INFINITE_ACCURACY)){
|
||||||
Sample.INSTANCE.play(Assets.Sounds.HIT_STRONG);
|
Sample.INSTANCE.play(Assets.Sounds.HIT_STRONG);
|
||||||
}
|
}
|
||||||
onAbilityUsed(hero);
|
|
||||||
hero.spendAndNext(2*hero.attackDelay());
|
hero.spendAndNext(2*hero.attackDelay());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
+1
-1
@@ -80,6 +80,7 @@ public class Mace extends MeleeWeapon {
|
|||||||
hero.sprite.attack(enemy.pos, new Callback() {
|
hero.sprite.attack(enemy.pos, new Callback() {
|
||||||
@Override
|
@Override
|
||||||
public void call() {
|
public void call() {
|
||||||
|
wep.onAbilityUsed(hero);
|
||||||
if (hero.attack(enemy, dmgMulti, 0, 0.25f)) {
|
if (hero.attack(enemy, dmgMulti, 0, 0.25f)) {
|
||||||
Sample.INSTANCE.play(Assets.Sounds.HIT_STRONG);
|
Sample.INSTANCE.play(Assets.Sounds.HIT_STRONG);
|
||||||
if (enemy.isAlive()){
|
if (enemy.isAlive()){
|
||||||
@@ -87,7 +88,6 @@ public class Mace extends MeleeWeapon {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
hero.spendAndNext(hero.attackDelay());
|
hero.spendAndNext(hero.attackDelay());
|
||||||
wep.onAbilityUsed(hero);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
+9
-1
@@ -23,10 +23,12 @@ package com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee;
|
|||||||
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Barrier;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.LockedFloor;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.LockedFloor;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroClass;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroClass;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.Weapon;
|
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.Weapon;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.CellSelector;
|
import com.shatteredpixel.shatteredpixeldungeon.scenes.CellSelector;
|
||||||
@@ -35,7 +37,6 @@ import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
|||||||
import com.watabou.utils.Bundle;
|
import com.watabou.utils.Bundle;
|
||||||
import com.watabou.utils.Random;
|
import com.watabou.utils.Random;
|
||||||
|
|
||||||
import java.text.DecimalFormat;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
public class MeleeWeapon extends Weapon {
|
public class MeleeWeapon extends Weapon {
|
||||||
@@ -132,6 +133,13 @@ public class MeleeWeapon extends Weapon {
|
|||||||
|
|
||||||
protected void onAbilityUsed(Hero hero ){
|
protected void onAbilityUsed(Hero hero ){
|
||||||
Buff.affect(hero, Charger.class).charges -= abilityChargeUse();
|
Buff.affect(hero, Charger.class).charges -= abilityChargeUse();
|
||||||
|
|
||||||
|
if (hero.heroClass == HeroClass.DUELIST
|
||||||
|
&& hero.hasTalent(Talent.AGGRESSIVE_BARRIER)
|
||||||
|
&& (hero.HP / (float)hero.HT) < 0.167f*(1+hero.pointsInTalent(Talent.AGGRESSIVE_BARRIER))){
|
||||||
|
Buff.affect(hero, Barrier.class).setShield(2);
|
||||||
|
}
|
||||||
|
|
||||||
updateQuickslot();
|
updateQuickslot();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -109,10 +109,10 @@ public class Rapier extends MeleeWeapon {
|
|||||||
@Override
|
@Override
|
||||||
public void call() {
|
public void call() {
|
||||||
//+3+lvl damage, equivalent to +67% damage, but more consistent
|
//+3+lvl damage, equivalent to +67% damage, but more consistent
|
||||||
|
onAbilityUsed(hero);
|
||||||
if (hero.attack(enemy, 1f, augment.damageFactor(3 + level()), Char.INFINITE_ACCURACY)){
|
if (hero.attack(enemy, 1f, augment.damageFactor(3 + level()), Char.INFINITE_ACCURACY)){
|
||||||
Sample.INSTANCE.play(Assets.Sounds.HIT_STRONG);
|
Sample.INSTANCE.play(Assets.Sounds.HIT_STRONG);
|
||||||
}
|
}
|
||||||
onAbilityUsed(hero);
|
|
||||||
hero.spendAndNext(hero.attackDelay());
|
hero.spendAndNext(hero.attackDelay());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
+1
-1
@@ -67,9 +67,9 @@ public class RoundShield extends MeleeWeapon {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void guardAbility(Hero hero, int duration, MeleeWeapon wep){
|
public static void guardAbility(Hero hero, int duration, MeleeWeapon wep){
|
||||||
|
wep.onAbilityUsed(hero);
|
||||||
Buff.affect(hero, GuardTracker.class, duration);
|
Buff.affect(hero, GuardTracker.class, duration);
|
||||||
hero.sprite.operate(hero.pos);
|
hero.sprite.operate(hero.pos);
|
||||||
wep.onAbilityUsed(hero);
|
|
||||||
hero.spendAndNext(Actor.TICK);
|
hero.spendAndNext(Actor.TICK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -81,11 +81,11 @@ public class RunicBlade extends MeleeWeapon {
|
|||||||
hero.sprite.attack(enemy.pos, new Callback() {
|
hero.sprite.attack(enemy.pos, new Callback() {
|
||||||
@Override
|
@Override
|
||||||
public void call() {
|
public void call() {
|
||||||
|
onAbilityUsed(hero);
|
||||||
if (hero.attack(enemy, 1f, 0, Char.INFINITE_ACCURACY)){
|
if (hero.attack(enemy, 1f, 0, Char.INFINITE_ACCURACY)){
|
||||||
Sample.INSTANCE.play(Assets.Sounds.HIT_STRONG);
|
Sample.INSTANCE.play(Assets.Sounds.HIT_STRONG);
|
||||||
}
|
}
|
||||||
tracker.detach();
|
tracker.detach();
|
||||||
onAbilityUsed(hero);
|
|
||||||
hero.spendAndNext(hero.attackDelay());
|
hero.spendAndNext(hero.attackDelay());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
+1
-3
@@ -30,12 +30,10 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.FlavourBuff;
|
|||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
||||||
import com.watabou.noosa.audio.Sample;
|
import com.watabou.noosa.audio.Sample;
|
||||||
import com.watabou.utils.Callback;
|
import com.watabou.utils.Callback;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
|
|
||||||
public class Sai extends MeleeWeapon {
|
public class Sai extends MeleeWeapon {
|
||||||
@@ -84,8 +82,8 @@ public class Sai extends MeleeWeapon {
|
|||||||
hero.sprite.attack(enemy.pos, new Callback() {
|
hero.sprite.attack(enemy.pos, new Callback() {
|
||||||
@Override
|
@Override
|
||||||
public void call() {
|
public void call() {
|
||||||
boolean hit = hero.attack(enemy, 1, 0, Char.INFINITE_ACCURACY);
|
|
||||||
wep.onAbilityUsed(hero);
|
wep.onAbilityUsed(hero);
|
||||||
|
boolean hit = hero.attack(enemy, 1, 0, Char.INFINITE_ACCURACY);
|
||||||
|
|
||||||
HashSet<ComboStrikeTracker> buffs = hero.buffs(ComboStrikeTracker.class);
|
HashSet<ComboStrikeTracker> buffs = hero.buffs(ComboStrikeTracker.class);
|
||||||
int recentHits = 0;
|
int recentHits = 0;
|
||||||
|
|||||||
+1
-6
@@ -25,11 +25,7 @@ import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
|||||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Vertigo;
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Vulnerable;
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent;
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfBlastWave;
|
import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfBlastWave;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.mechanics.Ballistica;
|
import com.shatteredpixel.shatteredpixeldungeon.mechanics.Ballistica;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||||
@@ -85,7 +81,7 @@ public class Spear extends MeleeWeapon {
|
|||||||
hero.sprite.attack(enemy.pos, new Callback() {
|
hero.sprite.attack(enemy.pos, new Callback() {
|
||||||
@Override
|
@Override
|
||||||
public void call() {
|
public void call() {
|
||||||
|
wep.onAbilityUsed(hero);
|
||||||
if (hero.attack(enemy, dmgMulti, 0, Char.INFINITE_ACCURACY)) {
|
if (hero.attack(enemy, dmgMulti, 0, Char.INFINITE_ACCURACY)) {
|
||||||
if (enemy.isAlive()){
|
if (enemy.isAlive()){
|
||||||
//trace a ballistica to our target (which will also extend past them
|
//trace a ballistica to our target (which will also extend past them
|
||||||
@@ -97,7 +93,6 @@ public class Spear extends MeleeWeapon {
|
|||||||
}
|
}
|
||||||
Sample.INSTANCE.play(Assets.Sounds.HIT_STRONG);
|
Sample.INSTANCE.play(Assets.Sounds.HIT_STRONG);
|
||||||
}
|
}
|
||||||
wep.onAbilityUsed(hero);
|
|
||||||
hero.spendAndNext(hero.attackDelay());
|
hero.spendAndNext(hero.attackDelay());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
+1
-1
@@ -79,10 +79,10 @@ public class Sword extends MeleeWeapon {
|
|||||||
hero.sprite.attack(enemy.pos, new Callback() {
|
hero.sprite.attack(enemy.pos, new Callback() {
|
||||||
@Override
|
@Override
|
||||||
public void call() {
|
public void call() {
|
||||||
|
wep.onAbilityUsed(hero);
|
||||||
if (hero.attack(enemy, dmgMulti, 0, Char.INFINITE_ACCURACY)){
|
if (hero.attack(enemy, dmgMulti, 0, Char.INFINITE_ACCURACY)){
|
||||||
Sample.INSTANCE.play(Assets.Sounds.HIT_STRONG);
|
Sample.INSTANCE.play(Assets.Sounds.HIT_STRONG);
|
||||||
}
|
}
|
||||||
wep.onAbilityUsed(hero);
|
|
||||||
|
|
||||||
if (!enemy.isAlive()){
|
if (!enemy.isAlive()){
|
||||||
hero.next();
|
hero.next();
|
||||||
|
|||||||
+1
-4
@@ -25,13 +25,10 @@ import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
|||||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Vulnerable;
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
||||||
import com.watabou.noosa.audio.Sample;
|
|
||||||
import com.watabou.utils.Callback;
|
import com.watabou.utils.Callback;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@@ -76,11 +73,11 @@ public class Whip extends MeleeWeapon {
|
|||||||
hero.sprite.attack(hero.pos, new Callback() {
|
hero.sprite.attack(hero.pos, new Callback() {
|
||||||
@Override
|
@Override
|
||||||
public void call() {
|
public void call() {
|
||||||
|
onAbilityUsed(hero);
|
||||||
for (Char ch : targets) {
|
for (Char ch : targets) {
|
||||||
hero.attack(ch);
|
hero.attack(ch);
|
||||||
}
|
}
|
||||||
hero.spendAndNext(hero.attackDelay());
|
hero.spendAndNext(hero.attackDelay());
|
||||||
onAbilityUsed(hero);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user