add sharpness +2 support for mhx
This commit is contained in:
@@ -113,7 +113,8 @@ def parse_weapon_arg(arg, base_args):
|
|||||||
|
|
||||||
|
|
||||||
def get_skill_names(args):
|
def get_skill_names(args):
|
||||||
return ["Sharpness +1" if args.sharpness_plus_one else "",
|
return ["Sharpness +%d" % args.sharpness_plus
|
||||||
|
if args.sharpness_plus else "",
|
||||||
"Awaken" if args.awaken else "",
|
"Awaken" if args.awaken else "",
|
||||||
skills.AttackUp.name(args.attack_up),
|
skills.AttackUp.name(args.attack_up),
|
||||||
skills.CriticalEye.name(args.critical_eye),
|
skills.CriticalEye.name(args.critical_eye),
|
||||||
@@ -128,9 +129,9 @@ def percent_change(a, b):
|
|||||||
|
|
||||||
|
|
||||||
def _add_skill_args(parser):
|
def _add_skill_args(parser):
|
||||||
parser.add_argument("-s", "--sharpness-plus-one", action="store_true",
|
parser.add_argument("-s", "--sharpness-plus", type=int,
|
||||||
default=False,
|
default=False,
|
||||||
help="add Sharpness +1 skill, default off")
|
help="add Sharpness +1 or +2 skill, default off")
|
||||||
parser.add_argument("-f", "--awaken", action="store_true",
|
parser.add_argument("-f", "--awaken", action="store_true",
|
||||||
default=False,
|
default=False,
|
||||||
help="add Awaken (FreeElemnt), default off")
|
help="add Awaken (FreeElemnt), default off")
|
||||||
@@ -400,7 +401,7 @@ if __name__ == '__main__':
|
|||||||
skill_args = skill_args_map.get(name, args)
|
skill_args = skill_args_map.get(name, args)
|
||||||
wd = WeaponMonsterDamage(row,
|
wd = WeaponMonsterDamage(row,
|
||||||
monster, monster_damage,
|
monster, monster_damage,
|
||||||
motion, skill_args.sharpness_plus_one,
|
motion, skill_args.sharpness_plus,
|
||||||
monster_breaks,
|
monster_breaks,
|
||||||
attack_skill=skill_args.attack_up,
|
attack_skill=skill_args.attack_up,
|
||||||
critical_eye_skill=skill_args.critical_eye,
|
critical_eye_skill=skill_args.critical_eye,
|
||||||
|
|||||||
@@ -206,8 +206,10 @@ class WeaponMonsterDamage(object):
|
|||||||
else:
|
else:
|
||||||
self.true_raw = (self.weapon["attack"]
|
self.true_raw = (self.weapon["attack"]
|
||||||
/ WeaponType.multiplier(self.weapon_type))
|
/ WeaponType.multiplier(self.weapon_type))
|
||||||
if sharp_plus:
|
if sharp_plus == 1:
|
||||||
self.sharpness = self.weapon.sharpness_plus.max
|
self.sharpness = self.weapon.sharpness_plus.max
|
||||||
|
elif sharp_plus == 2:
|
||||||
|
self.sharpness = self.weapon.sharpness_plus2.max
|
||||||
else:
|
else:
|
||||||
self.sharpness = self.weapon.sharpness.max
|
self.sharpness = self.weapon.sharpness.max
|
||||||
#print "sharpness=", self.sharpness
|
#print "sharpness=", self.sharpness
|
||||||
|
|||||||
@@ -383,6 +383,8 @@ class Weapon(ItemCraftable):
|
|||||||
self.sharpness = WeaponSharpness(self._row["sharpness"] + [0])
|
self.sharpness = WeaponSharpness(self._row["sharpness"] + [0])
|
||||||
self.sharpness_plus = WeaponSharpness(
|
self.sharpness_plus = WeaponSharpness(
|
||||||
self._row["sharpness_plus"] + [0])
|
self._row["sharpness_plus"] + [0])
|
||||||
|
self.sharpness_plus2 = WeaponSharpness(
|
||||||
|
self._row["sharpness_plus2"] + [0])
|
||||||
else:
|
else:
|
||||||
# 4U data from db
|
# 4U data from db
|
||||||
parts = self._row["sharpness"].split(" ")
|
parts = self._row["sharpness"].split(" ")
|
||||||
@@ -392,6 +394,7 @@ class Weapon(ItemCraftable):
|
|||||||
normal, plus = parts
|
normal, plus = parts
|
||||||
self._data["sharpness"] = WeaponSharpness(normal)
|
self._data["sharpness"] = WeaponSharpness(normal)
|
||||||
self._data["sharpness_plus"] = WeaponSharpness(plus)
|
self._data["sharpness_plus"] = WeaponSharpness(plus)
|
||||||
|
self._data["sharpness_plus2"] = WeaponSharpness(plus)
|
||||||
|
|
||||||
def is_not_localized(self):
|
def is_not_localized(self):
|
||||||
return (self.name == self.name_jp)
|
return (self.name == self.name_jp)
|
||||||
|
|||||||
Reference in New Issue
Block a user