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