Skip to content

Commit

Permalink
增加“体能”数据变化
Browse files Browse the repository at this point in the history
  • Loading branch information
omvjro committed Jan 10, 2025
1 parent e044b7f commit 14f7002
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 11 deletions.
4 changes: 4 additions & 0 deletions src/assets/data.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,10 @@ const statics = {
tending: {},
housekeeping: {},
danceskill: {},
physique: {
value: [8, 16, 24],
valueMacro: ['physique_loss', 'physique'],
},
net: {
value: false,
limit: [1, 0],
Expand Down
3 changes: 0 additions & 3 deletions src/assets/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ const getCode = (sourceHTML, isHTML = false) => {

Object.values(mockOutput.children).forEach((child) => {
if (child.tagName === 'A') {
// 新版dol已支持在链接中使用<<he>>
// child.textContent = replacePronouns(child.textContent, '${$NPCList[0].pronouns.him}');

const endevent = child.getAttribute('endevent') ? `<<${child.getAttribute('endevent')}>>` : '';
const linktime = child.getAttribute('linktime') ? `<<pass ${child.getAttribute('linktime')}>>` : '';
const linkto = child.getAttribute('linkto') || '';
Expand Down
6 changes: 4 additions & 2 deletions src/components/panel/StatChange.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ watch(type, (t) => {
function insertStatChange() {
const isPlus = plus.value.includes('g');
const value = stat.value.value === false ? undefined : (stat.value.value || statics[type.value]._?.value);
const valueMacro = stat.value.valueMacro;
const valueMacroIsArray = Array.isArray(valueMacro);
let realStatName = statName.value;
let realPlus = plus.value;
Expand All @@ -36,13 +38,13 @@ function insertStatChange() {
realStatName = stat.value.variant;
}
let valueType = stat.value.valueMacro || realStatName;
let valueType = valueMacroIsArray ? valueMacro[+isPlus] : valueMacro || realStatName;
if (type.value === 'npc') {
valueType = `npcincr "${ stat.value.npc || npc.value || '' }" ${ stat.value.valueType || realStatName }`;
}
let code = `<<${realPlus}${realStatName}${stat.value.npcs && npc.value ? ` "${npc.value}"` : ''}>>`;
const valueCode = value ? `<<${valueType} ${isPlus ? '' : '-'}${value[realPlus.length - 1]}>>` : '';
const valueCode = value ? `<<${valueType} ${valueMacroIsArray || isPlus ? '' : '-'}${value[realPlus.length - 1]}>>` : '';
let text = `${ getOptionText('statPlus') } ${
getOptionText('statNPC') || ''
}${ getOptionText('statName') }`;
Expand Down
1 change: 1 addition & 0 deletions src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@
"tending": "Tending",
"housekeeping": "Housekeeping",
"danceskill": "Dance skill",
"physique": "Physique",
"net": "Net proficiency",
"baton": "Baton proficiency",
"whip": "Whip proficiency",
Expand Down
5 changes: 3 additions & 2 deletions src/locales/zh-HK.json
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@
"tending": "護理",
"housekeeping": "家務",
"danceskill": "舞蹈",
"physique": "體能",
"net": "網捕技巧",
"baton": "短棍技巧",
"whip": "鞭子技巧",
Expand All @@ -203,8 +204,8 @@
"chaos": "混亂",
"aggro": "雷米的滲透",
"farm": "農場產量",
"daring": "膽量",
"obey": "順從",
"daring": "大膽",
"obey": "服從",
"grace": "恩典",
"hallucinogens": "致幻",
"alcohol": "醉酒",
Expand Down
5 changes: 3 additions & 2 deletions src/locales/zh-TW.json
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@
"tending": "護理",
"housekeeping": "家務",
"danceskill": "舞蹈",
"physique": "體能",
"net": "網捕技巧",
"baton": "短棍技巧",
"whip": "鞭子技巧",
Expand All @@ -203,8 +204,8 @@
"chaos": "混亂",
"aggro": "雷米的滲透",
"farm": "農場產量",
"daring": "膽量",
"obey": "順從",
"daring": "大膽",
"obey": "服從",
"grace": "恩典",
"hallucinogens": "致幻",
"alcohol": "醉酒",
Expand Down
5 changes: 3 additions & 2 deletions src/locales/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@
"tending": "护理",
"housekeeping": "家务",
"danceskill": "舞蹈",
"physique": "体能",
"net": "网捕技巧",
"baton": "短棍技巧",
"whip": "鞭子技巧",
Expand All @@ -203,8 +204,8 @@
"chaos": "混乱",
"aggro": "雷米的渗透",
"farm": "农场产量",
"daring": "胆量",
"obey": "顺从",
"daring": "大胆",
"obey": "服从",
"grace": "恩典",
"hallucinogens": "致幻",
"alcohol": "醉酒",
Expand Down

0 comments on commit 14f7002

Please sign in to comment.