v2.2.0: improved weapon quickslotting with metamorphed swift equip
This commit is contained in:
@@ -184,7 +184,7 @@ public class Pickaxe extends MeleeWeapon {
|
||||
} else if (Blacksmith.Quest.oldMiningQuest()) {
|
||||
return AC_MINE;
|
||||
} else {
|
||||
return defaultAction;
|
||||
return super.defaultAction();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -112,6 +112,11 @@ public class MagesStaff extends MeleeWeapon {
|
||||
return actions;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String defaultAction() {
|
||||
return AC_ZAP;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void activate( Char ch ) {
|
||||
super.activate(ch);
|
||||
|
||||
@@ -69,7 +69,8 @@ public class MeleeWeapon extends Weapon {
|
||||
|
||||
@Override
|
||||
public String defaultAction() {
|
||||
if (Dungeon.hero != null && Dungeon.hero.heroClass == HeroClass.DUELIST){
|
||||
if (Dungeon.hero != null && (Dungeon.hero.heroClass == HeroClass.DUELIST
|
||||
|| Dungeon.hero.hasTalent(Talent.SWIFT_EQUIP))){
|
||||
return AC_ABILITY;
|
||||
} else {
|
||||
return super.defaultAction();
|
||||
@@ -99,30 +100,28 @@ public class MeleeWeapon extends Weapon {
|
||||
super.execute(hero, action);
|
||||
|
||||
if (action.equals(AC_ABILITY)){
|
||||
usesTargeting = false;
|
||||
if (!isEquipped(hero)) {
|
||||
if (hero.hasTalent(Talent.SWIFT_EQUIP)){
|
||||
if (hero.buff(Talent.SwiftEquipCooldown.class) == null
|
||||
|| hero.buff(Talent.SwiftEquipCooldown.class).hasSecondUse()){
|
||||
execute(hero, AC_EQUIP);
|
||||
} else {
|
||||
} else if (hero.heroClass == HeroClass.DUELIST) {
|
||||
GLog.w(Messages.get(this, "ability_need_equip"));
|
||||
usesTargeting = false;
|
||||
}
|
||||
} else {
|
||||
} else if (hero.heroClass == HeroClass.DUELIST) {
|
||||
GLog.w(Messages.get(this, "ability_need_equip"));
|
||||
usesTargeting = false;
|
||||
}
|
||||
} else if (hero.heroClass != HeroClass.DUELIST){
|
||||
//do nothing
|
||||
} else if (STRReq() > hero.STR()){
|
||||
GLog.w(Messages.get(this, "ability_low_str"));
|
||||
usesTargeting = false;
|
||||
} else if (hero.belongings.weapon == this &&
|
||||
(Buff.affect(hero, Charger.class).charges + Buff.affect(hero, Charger.class).partialCharge) < abilityChargeUse(hero, null)) {
|
||||
GLog.w(Messages.get(this, "ability_no_charge"));
|
||||
usesTargeting = false;
|
||||
} else if (hero.belongings.secondWep == this &&
|
||||
(Buff.affect(hero, Charger.class).secondCharges + Buff.affect(hero, Charger.class).secondPartialCharge) < abilityChargeUse(hero, null)) {
|
||||
GLog.w(Messages.get(this, "ability_no_charge"));
|
||||
usesTargeting = false;
|
||||
} else {
|
||||
|
||||
if (targetingPrompt() == null){
|
||||
|
||||
Reference in New Issue
Block a user