mirror of
https://github.com/baiqwerdvd/StarRailUID.git
synced 2025-05-07 12:43:25 +08:00
🚨修复爆伤加成错误的问题
This commit is contained in:
parent
f117bc56eb
commit
f4141646d7
@ -215,7 +215,7 @@ async def draw_char_info_img(raw_mes: str, sr_uid: str, url: Optional[str]):
|
||||
anchor='lm',
|
||||
)
|
||||
# 暴击率
|
||||
critical_chance = mp.mpf(char.base_attributes['CriticalChance'])
|
||||
critical_chance = mp.mpf(char.base_attributes['CriticalChanceBase'])
|
||||
critical_chance_base = mp.mpf(char.add_attr.get('CriticalChanceBase', 0))
|
||||
critical_chance = (critical_chance + critical_chance_base) * 100
|
||||
critical_chance = nstr(critical_chance, 3)
|
||||
@ -227,7 +227,7 @@ async def draw_char_info_img(raw_mes: str, sr_uid: str, url: Optional[str]):
|
||||
'rm',
|
||||
)
|
||||
# 暴击伤害
|
||||
critical_damage = mp.mpf(char.base_attributes['CriticalDamage'])
|
||||
critical_damage = mp.mpf(char.base_attributes['CriticalDamageBase'])
|
||||
critical_damage_base = mp.mpf(char.add_attr.get('CriticalDamageBase', 0))
|
||||
critical_damage = (critical_damage + critical_damage_base) * 100
|
||||
critical_damage = nstr(critical_damage, 4)
|
||||
|
@ -266,11 +266,11 @@ async def get_data(char: dict, sr_data: dict, sr_uid: str):
|
||||
mp.mpf(avatar_promotion_base["SpeedBase"]['Value'])
|
||||
)
|
||||
# 暴击率
|
||||
base_attributes['CriticalChance'] = str(
|
||||
base_attributes['CriticalChanceBase'] = str(
|
||||
mp.mpf(avatar_promotion_base["CriticalChance"]['Value'])
|
||||
)
|
||||
# 暴击伤害
|
||||
base_attributes['CriticalDamage'] = str(
|
||||
base_attributes['CriticalDamageBase'] = str(
|
||||
mp.mpf(avatar_promotion_base["CriticalDamage"]['Value'])
|
||||
)
|
||||
# 嘲讽
|
||||
|
@ -2,7 +2,7 @@ from typing import Dict
|
||||
|
||||
from mpmath import mp
|
||||
|
||||
from .effect.Base.Role import RoleInstance
|
||||
from .effect.Role import RoleInstance
|
||||
from ..starrailuid_charinfo.mono.Character import Character
|
||||
from ..starrailuid_charinfo.draw_char_img import cal_char_info
|
||||
|
||||
|
@ -1,120 +0,0 @@
|
||||
{
|
||||
"一场术后对话": {
|
||||
"enable": true,
|
||||
"trigger": {
|
||||
"useUltimate": true
|
||||
},
|
||||
"Q_finalHeal": [
|
||||
0.12,
|
||||
0.15,
|
||||
0.18,
|
||||
0.21,
|
||||
0.24
|
||||
]
|
||||
},
|
||||
"同一种心情": {
|
||||
"enable": true,
|
||||
"trigger": {
|
||||
"useSkill": true
|
||||
},
|
||||
"SPAdd": [
|
||||
2.0,
|
||||
2.5,
|
||||
3.0,
|
||||
3.5,
|
||||
4.0
|
||||
]
|
||||
},
|
||||
"嘉果": {
|
||||
"enable": true,
|
||||
"trigger": {
|
||||
"initBattle": true
|
||||
},
|
||||
"SPAdd": [
|
||||
6.0,
|
||||
7.5,
|
||||
9.0,
|
||||
10.5,
|
||||
12.0
|
||||
]
|
||||
},
|
||||
"时节不居": {
|
||||
"enable": false
|
||||
},
|
||||
"暖夜不会漫长": {
|
||||
"enable": false
|
||||
},
|
||||
"此时恰好": {
|
||||
"enable": true,
|
||||
"trigger": null,
|
||||
"attrChange": {
|
||||
"need_mul": {
|
||||
"enable": true,
|
||||
"mul_with": "StatusResistance"
|
||||
},
|
||||
"has_max": true,
|
||||
"HealRatio_mul": [
|
||||
0.33,
|
||||
0.36,
|
||||
0.39,
|
||||
0.42,
|
||||
0.45
|
||||
],
|
||||
"HealRatio_max": [
|
||||
0.15,
|
||||
0.18,
|
||||
0.21,
|
||||
0.24,
|
||||
0.27
|
||||
]
|
||||
}
|
||||
},
|
||||
"物穰": {
|
||||
"enable": true,
|
||||
"trigger": {
|
||||
"useUltimate": true,
|
||||
"useSkill": true
|
||||
},
|
||||
"Q_finalHeal": [
|
||||
0.12,
|
||||
0.15,
|
||||
0.18,
|
||||
0.21,
|
||||
0.24
|
||||
],
|
||||
"E_finalHeal": [
|
||||
0.12,
|
||||
0.15,
|
||||
0.18,
|
||||
0.21,
|
||||
0.24
|
||||
]
|
||||
},
|
||||
"等价交换": {
|
||||
"enable": true,
|
||||
"trigger": {
|
||||
"initRound": true,
|
||||
"SPLow": 0.5
|
||||
},
|
||||
"SPAdd": [
|
||||
8.0,
|
||||
10.0,
|
||||
12.0,
|
||||
14.0,
|
||||
16.0
|
||||
]
|
||||
},
|
||||
"蕃息": {
|
||||
"enable": true,
|
||||
"trigger": {
|
||||
"useBaseAtk": true
|
||||
},
|
||||
"ActionAdvanced": [
|
||||
0.12,
|
||||
0.14,
|
||||
0.16,
|
||||
0.18,
|
||||
0.2
|
||||
]
|
||||
}
|
||||
}
|
41
StarRailUID/starrailuid_damagecal/effect/Avatar/Avatar.py
Normal file
41
StarRailUID/starrailuid_damagecal/effect/Avatar/Avatar.py
Normal file
@ -0,0 +1,41 @@
|
||||
from typing import Dict, List
|
||||
|
||||
from mpmath import mp
|
||||
|
||||
from ..Base.AvatarBase import BaseAvatar, BaseAvatarBuff
|
||||
|
||||
mp.dps = 14
|
||||
|
||||
|
||||
class Seele(BaseAvatar):
|
||||
Buff: BaseAvatarBuff
|
||||
|
||||
def __init__(self, char: Dict, skills: List):
|
||||
super().__init__(char=char, skills=skills)
|
||||
self.Buff = BaseAvatarBuff(char=char, skills=skills)
|
||||
self.eidolon_attribute = {}
|
||||
self.extra_ability_attribute = {}
|
||||
self.eidolons()
|
||||
self.extra_ability()
|
||||
|
||||
def Technique(self):
|
||||
pass
|
||||
|
||||
def eidolons(self):
|
||||
if self.avatar_rank >= 1:
|
||||
self.eidolon_attribute['CriticalDamageBase'] = mp.mpf(0.15)
|
||||
if self.avatar_rank >= 2:
|
||||
self.eidolon_attribute['SpeedAddedRatio'] = mp.mpf(0.5)
|
||||
|
||||
def extra_ability(self):
|
||||
# 额外能力 割裂 抗性穿透提高20
|
||||
if 1102102 in self.Buff.extra_ability_id:
|
||||
self.extra_ability_attribute[
|
||||
'QuantumResistancePenetration'
|
||||
] = mp.mpf(0.2)
|
||||
|
||||
|
||||
class Avatar:
|
||||
def __new__(cls, char: Dict, skills: List):
|
||||
if char['id'] == 1102:
|
||||
return Seele(char, skills)
|
@ -5,11 +5,11 @@ from abc import abstractmethod
|
||||
|
||||
from mpmath import mp
|
||||
|
||||
from .Skill import BaseSkills
|
||||
from .SkillBase import BaseSkills
|
||||
from ....utils.excel.read_excel import AvatarPromotion
|
||||
|
||||
path = Path(__file__).parent
|
||||
with open(path / 'seele.json', 'r', encoding='utf-8') as f:
|
||||
path = Path(__file__).parent.parent
|
||||
with open(path / 'Excel' / 'seele.json', 'r', encoding='utf-8') as f:
|
||||
skill_dict = json.load(f)
|
||||
|
||||
mp.dps = 14
|
||||
@ -71,11 +71,11 @@ class BaseAvatar:
|
||||
promotion["SpeedBase"]['Value']
|
||||
)
|
||||
# 暴击率
|
||||
self.avatar_attribute['CriticalChance'] = mp.mpf(
|
||||
self.avatar_attribute['CriticalChanceBase'] = mp.mpf(
|
||||
promotion["CriticalChance"]['Value']
|
||||
)
|
||||
# 暴击伤害
|
||||
self.avatar_attribute['CriticalDamage'] = mp.mpf(
|
||||
self.avatar_attribute['CriticalDamageBase'] = mp.mpf(
|
||||
promotion["CriticalDamage"]['Value']
|
||||
)
|
||||
# 嘲讽
|
||||
@ -113,37 +113,3 @@ class BaseAvatar:
|
||||
return mp.mpf(
|
||||
skill_dict[str(self.avatar_id)][''][self.Skill.Talent_.level - 1]
|
||||
)
|
||||
|
||||
|
||||
class Seele(BaseAvatar):
|
||||
Buff: BaseAvatarBuff
|
||||
|
||||
def __init__(self, char: Dict, skills: List):
|
||||
super().__init__(char=char, skills=skills)
|
||||
self.Buff = BaseAvatarBuff(char=char, skills=skills)
|
||||
self.eidolon_attribute = {}
|
||||
self.extra_ability_attribute = {}
|
||||
self.eidolons()
|
||||
self.extra_ability()
|
||||
|
||||
def Technique(self):
|
||||
pass
|
||||
|
||||
def eidolons(self):
|
||||
if self.avatar_rank >= 1:
|
||||
self.eidolon_attribute['CriticalDamageBase'] = mp.mpf(0.15)
|
||||
if self.avatar_rank >= 2:
|
||||
self.eidolon_attribute['SpeedAddedRatio'] = mp.mpf(0.5)
|
||||
|
||||
def extra_ability(self):
|
||||
# 额外能力 割裂 抗性穿透提高20
|
||||
if 1102102 in self.Buff.extra_ability_id:
|
||||
self.extra_ability_attribute[
|
||||
'QuantumResistancePenetration'
|
||||
] = mp.mpf(0.2)
|
||||
|
||||
|
||||
class Avatar:
|
||||
def __new__(cls, char: Dict, skills: List):
|
||||
if char['id'] == 1102:
|
||||
return Seele(char, skills)
|
88
StarRailUID/starrailuid_damagecal/effect/Base/RelicBase.py
Normal file
88
StarRailUID/starrailuid_damagecal/effect/Base/RelicBase.py
Normal file
@ -0,0 +1,88 @@
|
||||
from typing import Dict
|
||||
from abc import abstractmethod
|
||||
|
||||
from mpmath import mp
|
||||
from gsuid_core.logger import logger
|
||||
|
||||
from ....utils.map.SR_MAP_PATH import RelicSetSkill
|
||||
|
||||
mp.dps = 14
|
||||
|
||||
|
||||
class SingleRelic:
|
||||
def __init__(self, relic: Dict):
|
||||
self.raw_relic = relic
|
||||
self.relic_id = relic['relicId']
|
||||
self.set_id = relic['SetId']
|
||||
self.relic_type = relic['Type']
|
||||
self.relic_level = relic.get('Level', 0)
|
||||
self.relic_attribute_bonus = {}
|
||||
|
||||
def get_attribute_(self):
|
||||
# MainAffix
|
||||
if (
|
||||
self.raw_relic['MainAffix']['Property']
|
||||
in self.relic_attribute_bonus
|
||||
):
|
||||
self.relic_attribute_bonus[
|
||||
self.raw_relic['MainAffix']['Property']
|
||||
] += mp.mpf(self.raw_relic['MainAffix']['Value'])
|
||||
else:
|
||||
self.relic_attribute_bonus[
|
||||
self.raw_relic['MainAffix']['Property']
|
||||
] = mp.mpf(self.raw_relic['MainAffix']['Value'])
|
||||
|
||||
# SubAffix
|
||||
if self.raw_relic.get('SubAffixList'):
|
||||
for sub_affix in self.raw_relic['SubAffixList']:
|
||||
sub_affix_property = sub_affix['Property']
|
||||
value = mp.mpf(sub_affix['Value'])
|
||||
if sub_affix_property in self.relic_attribute_bonus:
|
||||
self.relic_attribute_bonus[sub_affix_property] += value
|
||||
else:
|
||||
self.relic_attribute_bonus[sub_affix_property] = value
|
||||
|
||||
|
||||
class BaseRelicSetSkill:
|
||||
setId: int
|
||||
pieces2: bool = False
|
||||
pieces4: bool = False
|
||||
|
||||
def __init__(self, set_id: int, count: int):
|
||||
self.setId = set_id
|
||||
if count >= 2:
|
||||
self.pieces2 = True
|
||||
logger.info(f'Relic {set_id} 2 pieces set activated')
|
||||
if count == 4:
|
||||
self.pieces4 = True
|
||||
logger.info(f'Relic {set_id} 4 pieces set activated')
|
||||
self.relicSetAttribute = {}
|
||||
self.set_skill_property_ability()
|
||||
|
||||
@abstractmethod
|
||||
async def check(self, base_attr: Dict, attribute_bonus: Dict):
|
||||
...
|
||||
|
||||
@abstractmethod
|
||||
async def set_skill_ability(self, base_attr: Dict, attribute_bonus: Dict):
|
||||
'''
|
||||
战斗加成属性, 与 set_skill_property() 互斥
|
||||
'''
|
||||
...
|
||||
|
||||
def set_skill_property_ability(self):
|
||||
set_property = ''
|
||||
set_value = mp.mpf(0)
|
||||
if self.pieces2 and RelicSetSkill[str(self.setId)]['2'] != {}:
|
||||
set_property = RelicSetSkill[str(self.setId)]['2']['Property']
|
||||
set_value = mp.mpf(RelicSetSkill[str(self.setId)]['2']['Value'])
|
||||
if self.pieces4 and RelicSetSkill[str(self.setId)]['4'] != {}:
|
||||
set_property = RelicSetSkill[str(self.setId)]['4']['Property']
|
||||
set_value = mp.mpf(RelicSetSkill[str(self.setId)]['4']['Value'])
|
||||
if set_property != '':
|
||||
if set_property in self.relicSetAttribute:
|
||||
self.relicSetAttribute[set_property] = (
|
||||
self.relicSetAttribute[set_property] + set_value
|
||||
)
|
||||
else:
|
||||
self.relicSetAttribute[set_property] = set_value
|
@ -7,8 +7,8 @@ from mpmath import mp
|
||||
mp.dps = 14
|
||||
|
||||
|
||||
path = Path(__file__).parent
|
||||
with open(path / 'seele.json', 'r', encoding='utf-8') as f:
|
||||
path = Path(__file__).parent.parent
|
||||
with open(path / 'Excel' / 'seele.json', 'r', encoding='utf-8') as f:
|
||||
skill_dict = json.load(f)
|
||||
|
||||
|
||||
@ -42,7 +42,3 @@ class BaseSkills:
|
||||
raise ValueError(
|
||||
f'Unknown skillAttackType: {skill_attack_type}'
|
||||
)
|
||||
|
||||
|
||||
# class SeeleSkill(BaseSkills):
|
||||
# pass
|
@ -1,93 +1,11 @@
|
||||
from typing import Dict, List
|
||||
from abc import abstractmethod
|
||||
from collections import Counter
|
||||
|
||||
from mpmath import mp
|
||||
from gsuid_core.logger import logger
|
||||
|
||||
from .utils import merge_attribute
|
||||
from ....utils.map.SR_MAP_PATH import RelicSetSkill
|
||||
|
||||
mp.dps = 14
|
||||
|
||||
|
||||
class SingleRelic:
|
||||
def __init__(self, relic: Dict):
|
||||
self.raw_relic = relic
|
||||
self.relic_id = relic['relicId']
|
||||
self.set_id = relic['SetId']
|
||||
self.relic_type = relic['Type']
|
||||
self.relic_level = relic.get('Level', 0)
|
||||
self.relic_attribute_bonus = {}
|
||||
|
||||
def get_attribute_(self):
|
||||
# MainAffix
|
||||
if (
|
||||
self.raw_relic['MainAffix']['Property']
|
||||
in self.relic_attribute_bonus
|
||||
):
|
||||
self.relic_attribute_bonus[
|
||||
self.raw_relic['MainAffix']['Property']
|
||||
] += mp.mpf(self.raw_relic['MainAffix']['Value'])
|
||||
else:
|
||||
self.relic_attribute_bonus[
|
||||
self.raw_relic['MainAffix']['Property']
|
||||
] = mp.mpf(self.raw_relic['MainAffix']['Value'])
|
||||
|
||||
# SubAffix
|
||||
if self.raw_relic.get('SubAffixList'):
|
||||
for sub_affix in self.raw_relic['SubAffixList']:
|
||||
sub_affix_property = sub_affix['Property']
|
||||
value = mp.mpf(sub_affix['Value'])
|
||||
if sub_affix_property in self.relic_attribute_bonus:
|
||||
self.relic_attribute_bonus[sub_affix_property] += value
|
||||
else:
|
||||
self.relic_attribute_bonus[sub_affix_property] = value
|
||||
|
||||
|
||||
class BaseRelicSetSkill:
|
||||
setId: int
|
||||
pieces2: bool = False
|
||||
pieces4: bool = False
|
||||
|
||||
def __init__(self, set_id: int, count: int):
|
||||
self.setId = set_id
|
||||
if count >= 2:
|
||||
self.pieces2 = True
|
||||
logger.info(f'Relic {set_id} 2 pieces set activated')
|
||||
if count == 4:
|
||||
self.pieces4 = True
|
||||
logger.info(f'Relic {set_id} 4 pieces set activated')
|
||||
self.relicSetAttribute = {}
|
||||
self.set_skill_property_ability()
|
||||
|
||||
@abstractmethod
|
||||
async def check(self, base_attr: Dict, attribute_bonus: Dict):
|
||||
...
|
||||
|
||||
@abstractmethod
|
||||
async def set_skill_ability(self, base_attr: Dict, attribute_bonus: Dict):
|
||||
'''
|
||||
战斗加成属性, 与 set_skill_property() 互斥
|
||||
'''
|
||||
...
|
||||
|
||||
def set_skill_property_ability(self):
|
||||
set_property = ''
|
||||
set_value = mp.mpf(0)
|
||||
if self.pieces2 and RelicSetSkill[str(self.setId)]['2'] != {}:
|
||||
set_property = RelicSetSkill[str(self.setId)]['2']['Property']
|
||||
set_value = mp.mpf(RelicSetSkill[str(self.setId)]['2']['Value'])
|
||||
if self.pieces4 and RelicSetSkill[str(self.setId)]['4'] != {}:
|
||||
set_property = RelicSetSkill[str(self.setId)]['4']['Property']
|
||||
set_value = mp.mpf(RelicSetSkill[str(self.setId)]['4']['Value'])
|
||||
if set_property != '':
|
||||
if set_property in self.relicSetAttribute:
|
||||
self.relicSetAttribute[set_property] = (
|
||||
self.relicSetAttribute[set_property] + set_value
|
||||
)
|
||||
else:
|
||||
self.relicSetAttribute[set_property] = set_value
|
||||
from ..utils import merge_attribute
|
||||
from ..Base.RelicBase import SingleRelic, BaseRelicSetSkill
|
||||
|
||||
|
||||
class Relic108(BaseRelicSetSkill):
|
||||
@ -120,7 +38,7 @@ class Relic306(BaseRelicSetSkill):
|
||||
装备者当前暴击率大于等于50%
|
||||
'''
|
||||
merged_attr = await merge_attribute(base_attr, attribute_bonus)
|
||||
if merged_attr['CriticalChance'] >= mp.mpf(0.5):
|
||||
if merged_attr['CriticalChanceBase'] >= mp.mpf(0.5):
|
||||
logger.info('Relic306 check success')
|
||||
return True
|
||||
|
@ -3,10 +3,10 @@ from typing import Dict
|
||||
from mpmath import mp
|
||||
from gsuid_core.logger import logger
|
||||
|
||||
from .Avatar import Avatar
|
||||
from .Weapon import Weapon
|
||||
from .Avatar.Avatar import Avatar
|
||||
from .Weapon.Weapon import Weapon
|
||||
from .utils import merge_attribute
|
||||
from .Relic import RelicSet, SingleRelic
|
||||
from .Relic.Relic import RelicSet, SingleRelic
|
||||
|
||||
mp.dps = 14
|
||||
|
||||
@ -29,7 +29,9 @@ class RoleInstance:
|
||||
self.cal_weapon_attr_add()
|
||||
|
||||
def cal_role_base_attr(self):
|
||||
print('cal_role_base_attr')
|
||||
avatar_attribute = self.avatar.__dict__['avatar_attribute']
|
||||
print(avatar_attribute)
|
||||
for attribute in avatar_attribute:
|
||||
if attribute in self.base_attr:
|
||||
self.base_attr[attribute] += avatar_attribute[attribute]
|
||||
@ -125,6 +127,8 @@ class RoleInstance:
|
||||
self.attribute_bonus = await set_skill.set_skill_ability(
|
||||
self.base_attr, self.attribute_bonus
|
||||
)
|
||||
print('merge_attribute')
|
||||
print(self.base_attr)
|
||||
merged_attr = await merge_attribute(
|
||||
self.base_attr, self.attribute_bonus
|
||||
)
|
||||
@ -195,10 +199,13 @@ class RoleInstance:
|
||||
f'有 {merged_attr[attr]} 伤害加成'
|
||||
)
|
||||
injury_area += merged_attr[attr]
|
||||
injury_area += 1
|
||||
logger.info(f'增伤区: {injury_area}')
|
||||
|
||||
# 爆伤区
|
||||
critical_damage = merged_attr['CriticalDamage']
|
||||
logger.info('检查是否有爆伤加成')
|
||||
logger.info(f'{merged_attr}')
|
||||
critical_damage_base = merged_attr['CriticalDamageBase']
|
||||
# 检查是否有对特定技能的爆伤加成
|
||||
# Ultra_CriticalChance
|
||||
for attr in merged_attr:
|
||||
@ -208,7 +215,8 @@ class RoleInstance:
|
||||
logger.info(
|
||||
f'{attr} 对 {skill_type} 有 {merged_attr[attr]} 爆伤加成'
|
||||
)
|
||||
critical_damage += merged_attr[attr]
|
||||
critical_damage_base += merged_attr[attr]
|
||||
critical_damage = critical_damage_base + 1
|
||||
logger.info(f'暴伤: {critical_damage}')
|
||||
|
||||
damage = (
|
@ -6,8 +6,8 @@ from mpmath import mp
|
||||
|
||||
from ..Base.WeaponBase import BaseWeapon
|
||||
|
||||
path = Path(__file__).parent
|
||||
with open(path / 'weapon_effect.json', 'r', encoding='utf-8') as f:
|
||||
path = Path(__file__).parent.parent
|
||||
with open(path / 'Excel' / 'weapon_effect.json', 'r', encoding='utf-8') as f:
|
||||
weapon_effect = json.load(f)
|
||||
|
||||
|
||||
@ -73,6 +73,7 @@ class CruisingintheStellarSea(BaseWeapon):
|
||||
self.weapon_rank - 1
|
||||
]
|
||||
)
|
||||
if await self.check():
|
||||
attack_added_ratio = attribute_bonus.get('AttackAddedRatio', 0)
|
||||
attribute_bonus['AttackAddedRatio'] = attack_added_ratio + mp.mpf(
|
||||
weapon_effect['24001']['Param']['AttackAddedRatio'][
|
@ -1,28 +0,0 @@
|
||||
{
|
||||
"108": {
|
||||
"2": {},
|
||||
"4": {
|
||||
"title": "对有量子弱点的目标造成伤害时,无视其20%的防御力",
|
||||
"data": [
|
||||
{
|
||||
"type": "def_ignore",
|
||||
"value": 0.10000000009313226
|
||||
},
|
||||
{
|
||||
"type": "def_ignore",
|
||||
"value": 0.10000000009313226
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"306": {
|
||||
"2": {
|
||||
"title": "终结技与追加攻击造成的伤害提高15%",
|
||||
"check": {
|
||||
"type": "CriticalChanceBase",
|
||||
"value": 0.5000000004656613
|
||||
},
|
||||
"data": 0.1500000001396984
|
||||
}
|
||||
}
|
||||
}
|
@ -24,9 +24,8 @@ async def merge_attribute(base_attr: Dict, attribute_bonus: Dict) -> Dict:
|
||||
else:
|
||||
raise Exception(f'attribute error {attribute}')
|
||||
elif attribute.__contains__('Base'):
|
||||
attr = attribute.split('Base')[0]
|
||||
attr_value = base_attr.get(attr, 0)
|
||||
merged_attr[attr] = attr_value + attribute_bonus[attribute]
|
||||
attr_value = base_attr.get(attribute, 0)
|
||||
merged_attr[attribute] = attr_value + attribute_bonus[attribute]
|
||||
elif attribute.__contains__('AddedRatio'):
|
||||
# attr = attribute.split('AddedRatio')[0]
|
||||
attr_value = base_attr.get(attribute, 0)
|
Loading…
x
Reference in New Issue
Block a user