dev
This commit is contained in:
+12
-11
@@ -104,27 +104,28 @@ class Skill:
|
||||
type = assoc.get('type', '*skillRation')
|
||||
skills = assoc.get('skills', '*')
|
||||
data = assoc.get('data', [0] * self.maxLv)
|
||||
ratio = assoc.get('ratio', 100)
|
||||
exceptSkills = assoc.get('exceptSkills', [])
|
||||
if type[0] not in ['*', '+', '$']:
|
||||
if self.precondition():
|
||||
getattr(self, type)(old, new, data, skills,exceptSkills)
|
||||
getattr(self, type)(old, new, data, skills,exceptSkills,ratio)
|
||||
continue
|
||||
if self.precondition():
|
||||
self._apply_association(type, old, new, data, skills,exceptSkills)
|
||||
self._apply_association(type, old, new, data, skills,exceptSkills,ratio)
|
||||
|
||||
def precondition(self):
|
||||
"""effect的前置条件"""
|
||||
return True
|
||||
|
||||
def _apply_association(self, type, old, new, data, skills, exceptSkills):
|
||||
def _apply_association(self, type, old, new, data, skills, exceptSkills,ratio = 100):
|
||||
if type.startswith('$*'):
|
||||
if 'cdReduce' in type:
|
||||
value = (1 - data[new] / 100) / (1 - data[old] / 100)
|
||||
value = (1 - data[new] / ratio) / (1 - data[old] / ratio)
|
||||
else:
|
||||
value = (1 + data[new] / 100) / (1 + data[old] / 100)
|
||||
value = (1 + data[new] / ratio) / (1 + data[old] / ratio)
|
||||
eval(f'self.char.SetStatus({type[2:]}={value})')
|
||||
elif type.startswith('$+'):
|
||||
value = data[new] / 100 - data[old] / 100
|
||||
value = data[new] / ratio - data[old] / ratio
|
||||
eval(f'self.char.SetStatus({type[2:]}={value})')
|
||||
else:
|
||||
if skills == '*':
|
||||
@@ -134,16 +135,16 @@ class Skill:
|
||||
continue
|
||||
skill = self.char.GetSkillByName(name)
|
||||
if skill is not None:
|
||||
self._update_skill_attribute(skill,type, old, new, data)
|
||||
self._update_skill_attribute(skill,type, old, new, data,ratio)
|
||||
|
||||
def _update_skill_attribute(self,skill, type, old, new, data):
|
||||
def _update_skill_attribute(self,skill, type, old, new, data,ratio = 100):
|
||||
if type.startswith('*'):
|
||||
if 'cdReduce' in type:
|
||||
setattr(skill, type[1:], getattr(skill, type[1:]) * (1 - data[new] / 100) / (1 - data[old] / 100))
|
||||
setattr(skill, type[1:], getattr(skill, type[1:]) * (1 - data[new] / ratio) / (1 - data[old] / ratio))
|
||||
else:
|
||||
setattr(skill, type[1:], getattr(skill, type[1:]) * (1 + data[new] / 100) / (1 + data[old] / 100))
|
||||
setattr(skill, type[1:], getattr(skill, type[1:]) * (1 + data[new] / ratio) / (1 + data[old] / ratio))
|
||||
elif type.startswith('+'):
|
||||
setattr(skill, type[1:], getattr(skill, type[1:]) + data[new] / 100 - data[old] / 100)
|
||||
setattr(skill, type[1:], getattr(skill, type[1:]) + data[new] / ratio - data[old] / ratio)
|
||||
|
||||
def skillInfo(self, mode: str | None = None):
|
||||
pass
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -21,7 +21,7 @@ adv = [
|
||||
'children': [
|
||||
{'id': 0, 'name': 'sword_master', 'title': '极诣·驭剑士', 'open': False},
|
||||
{'id': 1, 'name': 'dark_templar', 'title': '极诣·暗殿骑士', 'open': False},
|
||||
{'id': 2, 'name': 'demon_slayer', 'title': '极诣·契魔者', 'open': False},
|
||||
{'id': 2, 'name': 'demon_slayer', 'title': '极诣·契魔者', 'open': True, 'class': 'GF.swordman_female.demon_slayer'},
|
||||
{'id': 3, 'name': 'vegabond', 'title': '极诣·流浪武士', 'open': True, 'class': 'GF.swordman_female.vegabond'},
|
||||
{'id': 4, 'name': 'spectre', 'title': '极诣·刃影', 'open': False},
|
||||
],
|
||||
|
||||
Binary file not shown.
@@ -54,6 +54,7 @@ export interface IEquipment {
|
||||
categorize: string
|
||||
suit: string[]
|
||||
rarity: string
|
||||
max_adaptation:number
|
||||
}
|
||||
|
||||
export interface ISkill {
|
||||
|
||||
@@ -43,6 +43,9 @@
|
||||
alt=""
|
||||
class="w-20px h-20px object-contain"
|
||||
/>
|
||||
<div class="flex items-center justify-center" v-if="adaptation(part) > 0">
|
||||
<img :src="getImageURL(`/equipment/adaptation/${adaptation(part)}.png`)" alt="" class="w-10px h-10px object-contain" />
|
||||
</div>
|
||||
<div
|
||||
class="flex items-center"
|
||||
:class="props.equs[part]?.reinforceType == 1 ? 'artifact' : 'advanced'"
|
||||
@@ -92,6 +95,10 @@ const equ = (id: string) => {
|
||||
return infoStore.equips.find((e) => e.id == id)
|
||||
}
|
||||
|
||||
const adaptation = (part: string) => {
|
||||
return Math.min(equ(props.equs?.[part]?.id)?.max_adaptation ?? 0, props.equs[part]?.adaptation ?? 0)
|
||||
}
|
||||
|
||||
const lvFormat = (lv: number, rarity: string) => {
|
||||
if (rarity == '太初') return ''
|
||||
switch (lv) {
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 222 B |
Binary file not shown.
|
After Width: | Height: | Size: 218 B |
Binary file not shown.
|
After Width: | Height: | Size: 237 B |
Binary file not shown.
|
After Width: | Height: | Size: 233 B |
Binary file not shown.
|
After Width: | Height: | Size: 245 B |
Reference in New Issue
Block a user