From 515c49725ffdf368dcc70724c7004be10bb04efe Mon Sep 17 00:00:00 2001 From: ViVi <44130782+ViVi-shark@users.noreply.github.com> Date: Wed, 29 Jan 2025 20:43:45 +0900 Subject: [PATCH 01/54] =?UTF-8?q?:zap:=20=E8=BF=BD=E5=8A=A0:=20[SW2]=20?= =?UTF-8?q?=E7=9B=B4=E6=8E=A5=E4=BF=AE=E6=AD=A3=E6=A9=9F=E8=83=BD=E3=81=AB?= =?UTF-8?q?=E3=81=8A=E3=81=84=E3=81=A6=E3=80=81=E8=83=BD=E5=8A=9B=E5=80=A4?= =?UTF-8?q?=E3=81=AE=E5=A2=97=E5=BC=B7=E3=81=AE=E6=A6=82=E5=BF=B5=E3=82=92?= =?UTF-8?q?=E3=82=B5=E3=83=9D=E3=83=BC=E3=83=88=20(#319)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: ViVi --- _core/lib/sw2.0/edit-chara.pl | 3 ++- _core/lib/sw2/calc-chara.pl | 9 +++++++++ _core/lib/sw2/edit-chara.js | 19 ++++++++++++++++++- _core/lib/sw2/edit-chara.pl | 3 ++- _core/lib/sw2/subroutine-sw2.pl | 6 ++++++ _core/lib/sw2/view-chara.pl | 12 ++++++------ 6 files changed, 43 insertions(+), 9 deletions(-) diff --git a/_core/lib/sw2.0/edit-chara.pl b/_core/lib/sw2.0/edit-chara.pl index 2abc3f8a8..e32054588 100644 --- a/_core/lib/sw2.0/edit-chara.pl +++ b/_core/lib/sw2.0/edit-chara.pl @@ -1327,7 +1327,8 @@ sub classInputBox {
  • \@器用度+1\@防護点+1のように記述すると、常時有効な上昇効果が自動計算されます。
    有効な項目は、器用度精神力 生命抵抗力 精神抵抗力 回避力 防護点 移動力 魔力 行使判定 武器必筋上限です。
    - 同じ項目へは累積するため、同名や効果排他のアイテムには注意してください。 + 同じ項目へは累積するため、同名や効果排他のアイテムには注意してください。
    + 能力値の増強にかぎり、\@筋力増強+2のように増強の文言を記述することで、能力値ごとに最大の値のみを採用できます。 diff --git a/_core/lib/sw2/calc-chara.pl b/_core/lib/sw2/calc-chara.pl index dbe2a916c..e216b7573 100644 --- a/_core/lib/sw2/calc-chara.pl +++ b/_core/lib/sw2/calc-chara.pl @@ -292,10 +292,15 @@ sub data_calc { } ### 装備品の備考 -------------------------------------------------- my %equipModTotal = {}; + my %equipModStatusIncrement = {}; foreach (@{extractModifications(\%pc)}) { my %mod = %{$_}; foreach ('A'..'F'){ $pc{'sttEquip'.$_} += $mod{$_} // 0; + + # 増強 + $equipModStatusIncrement{$_} //= 0; + $equipModStatusIncrement{$_} = max($equipModStatusIncrement{$_}, $mod{"${_}:increment"} // 0); } foreach ('vResist','mResist','eva','def','mobility'){ $equipModTotal{$_} += $mod{$_} // 0; @@ -306,6 +311,10 @@ sub data_calc { $pc{reqdStrWeaponMod} += $mod{reqdWeapon} // 0; } + foreach ('A' .. 'F') { + $pc{"sttEquip${_}"} += $equipModStatusIncrement{$_}; + } + ### 能力値計算 -------------------------------------------------- ## 成長 $pc{sttHistGrowA} = $pc{sttHistGrowB} = $pc{sttHistGrowC} = $pc{sttHistGrowD} = $pc{sttHistGrowE} = $pc{sttHistGrowF} = 0; diff --git a/_core/lib/sw2/edit-chara.js b/_core/lib/sw2/edit-chara.js index 2cb6dc37d..3971299b9 100644 --- a/_core/lib/sw2/edit-chara.js +++ b/_core/lib/sw2/edit-chara.js @@ -2445,6 +2445,12 @@ function checkEquipMod (){ console.log('checkEquipMod()'); // 装飾品欄の補正 const sttRegEx = [ + ['A:increment','器(?:用度?)?増強'], + ['B:increment','敏(?:捷度?)?増強'], + ['C:increment','筋(?:力)?増強'], + ['D:increment','生(?:命力)?増強'], + ['E:increment','知力?増強'], + ['F:increment','精(?:神力?)?増強'], ['A','器(?:用度?)?'], ['B','敏(?:捷度?)?'], ['C','筋(?:力)?'], @@ -2462,6 +2468,7 @@ function checkEquipMod (){ ['WeaponReqd','武器(?:必要筋力|必筋)上限'], ]; let newMod = {}; + const statusIncrement = {}; document.querySelectorAll(':is(#weapons-table, #armours-table, #accessories-table) input[name$="Note"]').forEach( input => { const note = input.value ?? ''; @@ -2475,12 +2482,22 @@ function checkEquipMod (){ const m = note.match('[@@]'+i[1]+'([++--][0-9]+)'); if (m != null) { console.log(m[0],m[1]) + const value = parseInt(m[1].replace(/[+]/,"+").replace(/-/,"-") || 0); newMod[i[0]] ??= 0; - newMod[i[0]] += parseInt(m[1].replace(/[+]/,"+").replace(/-/,"-") || 0); + newMod[i[0]] += value; + + if (i[0].endsWith(':increment')) { + const key = i[0].replace(/:increment$/, ''); + statusIncrement[key] = Math.max(statusIncrement[key] ?? 0, value); + } } } } ); + for (const [key, value] of Object.entries(statusIncrement)) { + newMod[key] ??= 0; + newMod[key] += value; + } let hasChange; for(let i of sttRegEx){ if(parseInt(newMod[i[0]]||0) !== parseInt(equipMod[i[0]]||0)){ diff --git a/_core/lib/sw2/edit-chara.pl b/_core/lib/sw2/edit-chara.pl index 3bc3f9d23..2cd765ff0 100644 --- a/_core/lib/sw2/edit-chara.pl +++ b/_core/lib/sw2/edit-chara.pl @@ -1328,7 +1328,8 @@ sub classInputBox {
  • \@器用度+1\@防護点+1のように記述すると、常時有効な上昇効果が自動計算されます。
    有効な項目は、器用度精神力 生命抵抗力 精神抵抗力 回避力 防護点 移動力 魔力 行使判定 武器必筋上限です。
    - 同じ項目へは累積するため、同名や効果排他のアイテムには注意してください。 + 同じ項目へは累積するため、同名や効果排他のアイテムには注意してください。
    + 能力値の増強にかぎり、\@筋力増強+2のように増強の文言を記述することで、能力値ごとに最大の値のみを採用できます。 diff --git a/_core/lib/sw2/subroutine-sw2.pl b/_core/lib/sw2/subroutine-sw2.pl index 86d4db824..04aefd863 100644 --- a/_core/lib/sw2/subroutine-sw2.pl +++ b/_core/lib/sw2/subroutine-sw2.pl @@ -196,6 +196,12 @@ sub extractModifications { my $note = shift; my %sttRegEx = ( + 'A:increment' => '器(?:用度?)?増強', + 'B:increment' => '敏(?:捷度?)?増強', + 'C:increment' => '筋(?:力)?増強', + 'D:increment' => '生(?:命力)?増強', + 'E:increment' => '知力?増強', + 'F:increment' => '精(?:神力?)?増強', 'A' => '器(?:用度?)?', 'B' => '敏(?:捷度?)?', 'C' => '筋(?:力)?', diff --git a/_core/lib/sw2/view-chara.pl b/_core/lib/sw2/view-chara.pl index 8b94e9e22..8a3cf2242 100644 --- a/_core/lib/sw2/view-chara.pl +++ b/_core/lib/sw2/view-chara.pl @@ -659,12 +659,12 @@ sub replaceModificationNotation { $sourceText =~ s# [\@@] ( - 器(?:用度?)? | - 敏(?:捷度?)? | - 筋(?:力)? | - 生(?:命力)? | - 知力? | - 精(?:神力?)? | + 器(?:用度?)?(?:増強)? | + 敏(?:捷度?)?(?:増強)? | + 筋(?:力)?(?:増強)? | + 生(?:命力)?(?:増強)? | + 知力?(?:増強)? | + 精(?:神力?)?(?:増強)? | 生命抵抗力? | 精神抵抗力? | 回避力? | From 31525658e9fac75eae847403843a12ae16aafde4 Mon Sep 17 00:00:00 2001 From: TALE <42292222+yutorize@users.noreply.github.com> Date: Thu, 30 Jan 2025 22:25:46 +0900 Subject: [PATCH 02/54] =?UTF-8?q?:bug:=20=E4=BF=AE=E6=AD=A3:=20[AR2E]=20?= =?UTF-8?q?=E3=83=AC=E3=83=99=E3=83=AB=E3=82=A2=E3=83=83=E3=83=97=E6=AC=84?= =?UTF-8?q?=E3=81=A7=E3=82=B9=E3=82=AD=E3=83=AB=E3=83=AC=E3=83=99=E3=83=AB?= =?UTF-8?q?=E3=81=8C=E8=A1=A8=E7=A4=BA=E3=81=95=E3=82=8C=E3=81=AA=E3=81=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _core/skin/ar2e/css/edit.css | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/_core/skin/ar2e/css/edit.css b/_core/skin/ar2e/css/edit.css index 3f172a8d7..7d5f679be 100644 --- a/_core/skin/ar2e/css/edit.css +++ b/_core/skin/ar2e/css/edit.css @@ -228,7 +228,7 @@ dd.area-tags { } #levelup table { > thead { - > th { + > tr th { vertical-align: bottom; } > tr:first-child th:first-child { @@ -249,18 +249,18 @@ dd.area-tags { > tr:nth-last-of-type(even) { background-color: var(--box-even-rows-bg-color); } - > td.skill { + & td.skill { text-align: right; position: relative; } - > td.skill input { + & td.skill input { width: calc(100% - 1.5em - 1px); border-left: none; border-top-left-radius: 0; border-bottom-left-radius: 0; font-size: inherit; } - > td.skill::before { + & td.skill::before { content: attr(data-lv); display: grid; align-items: center; @@ -278,8 +278,8 @@ dd.area-tags { text-align: center; background-color: var(--input-bg-color); } - > td.skill[data-lv=""]::before, - > td.skill:not([data-lv])::before { + & td.skill[data-lv=""]::before, + & td.skill:not([data-lv])::before { content: 'Lv'; color: var(--box-input-border-color); } From c5023aa6155393807047ffd4535a81b7d434ce56 Mon Sep 17 00:00:00 2001 From: TALE <42292222+yutorize@users.noreply.github.com> Date: Sun, 16 Feb 2025 17:10:16 +0900 Subject: [PATCH 03/54] =?UTF-8?q?:bug:=20=E4=BF=AE=E6=AD=A3:=20[AR2E]=20HT?= =?UTF-8?q?ML=E4=B8=8A=E3=81=AE=E3=82=AF=E3=82=A9=E3=83=BC=E3=83=88?= =?UTF-8?q?=E6=8A=9C=E3=81=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _core/skin/ar2e/sheet-chara.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_core/skin/ar2e/sheet-chara.html b/_core/skin/ar2e/sheet-chara.html index 798b5c138..ab285c985 100644 --- a/_core/skin/ar2e/sheet-chara.html +++ b/_core/skin/ar2e/sheet-chara.html @@ -120,7 +120,7 @@

    <
    称号クラス
    -
    +
    種族
    From b0a683755e686ade85bd957d29bf6a91bcc18d0a Mon Sep 17 00:00:00 2001 From: TALE <42292222+yutorize@users.noreply.github.com> Date: Mon, 17 Feb 2025 18:50:18 +0900 Subject: [PATCH 04/54] =?UTF-8?q?:bug:=20=E4=BF=AE=E6=AD=A3:=20[SW2]=20?= =?UTF-8?q?=E3=82=B3=E3=82=B3=E3=83=95=E3=82=A9=E3=83=AA=E3=82=A2=E3=81=B8?= =?UTF-8?q?=E3=81=AE=E5=87=BA=E5=8A=9B=E3=81=AB=E3=81=8A=E3=81=84=E3=81=A6?= =?UTF-8?q?=E3=80=81=E9=AD=94=E6=B3=95=E6=8A=80=E8=83=BD=E3=81=8C=E3=81=AA?= =?UTF-8?q?=E3=81=8F=E3=83=90=E3=83=BC=E3=83=89=E6=8A=80=E8=83=BD=E3=81=AE?= =?UTF-8?q?=E3=81=BF=E3=81=8C=E3=81=82=E3=82=8B=E3=81=A8=E3=81=8D=E3=80=81?= =?UTF-8?q?=E3=80=8C=E9=AD=94=E6=B3=95C=E3=80=8D=E3=80=8C=E9=AD=94?= =?UTF-8?q?=E6=B3=95D=E4=BF=AE=E6=AD=A3=E3=80=8D=E3=81=AE=E3=83=91?= =?UTF-8?q?=E3=83=A9=E3=83=A1=E3=83=BC=E3=82=BF=E3=81=8C=E5=87=BA=E5=8A=9B?= =?UTF-8?q?=E3=81=95=E3=82=8C=E3=81=AA=E3=81=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _core/skin/sw2/js/lib/ytsheetToCcfolia.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/_core/skin/sw2/js/lib/ytsheetToCcfolia.js b/_core/skin/sw2/js/lib/ytsheetToCcfolia.js index 4472489ce..3195fce5d 100644 --- a/_core/skin/sw2/js/lib/ytsheetToCcfolia.js +++ b/_core/skin/sw2/js/lib/ytsheetToCcfolia.js @@ -22,7 +22,10 @@ output.generateCcfoliaJsonOfSwordWorld2PC = (json, character, defaultPalette) => character.params = character.params.filter(data => !/^(威力|C値|防護)[0-9]$/.test(data.label)); character.params = character.params.filter(data => !/^最大[MH]P$/.test(data.label)); if(!json.lvCaster){ - character.params = character.params.filter(data => !/^(魔力修正|行使修正|魔法C|魔法D修正)$/.test(data.label)); + character.params = character.params.filter(data => !/^(魔力修正|行使修正)$/.test(data.label)); + if(!json.lvBar){ + character.params = character.params.filter(data => !/^(魔法C|魔法D修正)$/.test(data.label)); + } } character.params = originalParams.concat(character.params); From 97ef852a1f6ac2d179f9da7100b77e0f62003808 Mon Sep 17 00:00:00 2001 From: TALE <42292222+yutorize@users.noreply.github.com> Date: Wed, 19 Feb 2025 18:38:33 +0900 Subject: [PATCH 05/54] =?UTF-8?q?=F0=9F=92=AC=20=E8=BF=BD=E5=8A=A0:=20[DX3?= =?UTF-8?q?]=20=E8=A1=9D=E5=8B=95=EF=BC=9A=E6=94=B9=E5=A4=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _core/lib/dx3/data-syndrome.pl | 1 + 1 file changed, 1 insertion(+) diff --git a/_core/lib/dx3/data-syndrome.pl b/_core/lib/dx3/data-syndrome.pl index 51b0fb5a1..04ff95daa 100644 --- a/_core/lib/dx3/data-syndrome.pl +++ b/_core/lib/dx3/data-syndrome.pl @@ -78,6 +78,7 @@ package data; ['自傷',16], ['恐怖',17], ['憎悪',18], + ['改変',30], ); 1; \ No newline at end of file From 6ce55f852fcdf57afedb989641c139c8a32b2809 Mon Sep 17 00:00:00 2001 From: TALE <42292222+yutorize@users.noreply.github.com> Date: Wed, 19 Feb 2025 18:40:08 +0900 Subject: [PATCH 06/54] =?UTF-8?q?:bug:=20=E4=BF=AE=E6=AD=A3:=20[SW2]=20?= =?UTF-8?q?=E8=A3=85=E9=A3=BE=E5=93=81=E5=8F=8A=E3=81=B3=E6=AD=A6=E5=99=A8?= =?UTF-8?q?=E3=81=AB=E3=82=88=E3=82=8B=E5=9B=9E=E9=81=BF=E5=8A=9B=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3=E3=81=8C=E3=83=81=E3=83=A3=E3=83=83=E3=83=88=E3=83=91?= =?UTF-8?q?=E3=83=AC=E3=83=83=E3=83=88=E3=81=AB=E5=8F=8D=E6=98=A0=E3=81=95?= =?UTF-8?q?=E3=82=8C=E3=81=AA=E3=81=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _core/lib/sw2/calc-chara.pl | 16 ++++++---------- _core/lib/sw2/palette-sub.pl | 2 +- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/_core/lib/sw2/calc-chara.pl b/_core/lib/sw2/calc-chara.pl index e216b7573..5ee0543b5 100644 --- a/_core/lib/sw2/calc-chara.pl +++ b/_core/lib/sw2/calc-chara.pl @@ -291,7 +291,6 @@ sub data_calc { $pc{raceAbility} =~ s/[(竜|魔物)化]/[剣の託宣/復活$1化]/; } ### 装備品の備考 -------------------------------------------------- - my %equipModTotal = {}; my %equipModStatusIncrement = {}; foreach (@{extractModifications(\%pc)}) { my %mod = %{$_}; @@ -302,10 +301,7 @@ sub data_calc { $equipModStatusIncrement{$_} //= 0; $equipModStatusIncrement{$_} = max($equipModStatusIncrement{$_}, $mod{"${_}:increment"} // 0); } - foreach ('vResist','mResist','eva','def','mobility'){ - $equipModTotal{$_} += $mod{$_} // 0; - } - foreach ('magicPower','magicCast','magicDamage'){ + foreach ('vResist','mResist','eva','def','mobility','magicPower','magicCast','magicDamage'){ $pc{$_.'Equip'} += $mod{$_} // 0; } $pc{reqdStrWeaponMod} += $mod{reqdWeapon} // 0; @@ -453,11 +449,11 @@ sub data_calc { ### サブステータス -------------------------------------------------- ## 生命抵抗力 $pc{vitResistBase} = $st{LvD}; - $pc{vitResistAddTotal} = $equipModTotal{vResist} + s_eval($pc{vitResistAdd}) + $pc{resistEnhance} + $pc{seekerAbilityResist}; + $pc{vitResistAddTotal} = $pc{vResistEquip} + s_eval($pc{vitResistAdd}) + $pc{resistEnhance} + $pc{seekerAbilityResist}; $pc{vitResistTotal} = $pc{vitResistBase} + $pc{vitResistAddTotal}; ## 精神抵抗力 $pc{mndResistBase} = $st{LvF}; - $pc{mndResistAddTotal} = $equipModTotal{mResist} + s_eval($pc{mndResistAdd}) + $pc{raceAbilityMndResist} + $pc{resistEnhance} + $pc{seekerAbilityResist}; + $pc{mndResistAddTotal} = $pc{mResistEquip} + s_eval($pc{mndResistAdd}) + $pc{raceAbilityMndResist} + $pc{resistEnhance} + $pc{seekerAbilityResist}; $pc{mndResistTotal} = $pc{mndResistBase} + $pc{mndResistAddTotal}; ## HPMP:装飾品 foreach my $type ('Head', 'Ear', 'Face', 'Neck', 'Back', 'HandR', 'HandL', 'Waist', 'Leg', 'Other', 'Other2','Other3','Other4') { @@ -488,7 +484,7 @@ sub data_calc { } $pc{mobilityBase} = $pc{sttAgi} + $pc{sttAddB} + $pc{sttEquipB}; $pc{mobilityBase} = $pc{mobilityBase} * 2 if ($pc{raceAbility} =~ /[半馬半人]/); - $pc{mobilityAddTotal} = s_eval($pc{mobilityAdd}) + $equipModTotal{mobility} + $own_mobility; + $pc{mobilityAddTotal} = s_eval($pc{mobilityAdd}) + $pc{mobilityEquip} + $own_mobility; $pc{mobilityTotal} = $pc{mobilityBase} + $pc{mobilityAddTotal}; $pc{mobilityFull} = $pc{mobilityTotal} * 3; $pc{mobilityLimited} = min($pc{footwork} ? 10 : 3, $pc{mobilityTotal}); @@ -699,8 +695,8 @@ sub data_calc { $eva += $lv ? $lv + int(($agi+$own_agi)/6) : 0; $def += $artisan; - $eva += $equipModTotal{eva}; - $def += $equipModTotal{def}; + $eva += $pc{evaEquip}; + $def += $pc{defEquip}; $pc{"defenseTotal${i}Eva"} = $eva; $pc{"defenseTotal${i}Def"} = $def; diff --git a/_core/lib/sw2/palette-sub.pl b/_core/lib/sw2/palette-sub.pl index 28fe4eb90..c2fea4238 100644 --- a/_core/lib/sw2/palette-sub.pl +++ b/_core/lib/sw2/palette-sub.pl @@ -898,7 +898,7 @@ sub paletteProperties { my $id = $data::class{$class}{id}; my $partNum = $::pc{"evasionPart$i"}; my $partName = $::pc{"evasionPart${i}Name"} = $::pc{"part${partNum}Name"}; - my $evaMod = 0; + my $evaMod = $::pc{evaEquip}; my $ownAgi; my $hasChecked = 0; foreach my $j (1..$::pc{armourNum}){ From e5645a25162fa074610c155e6e58fa4abf6ad21c Mon Sep 17 00:00:00 2001 From: ViVi <44130782+ViVi-shark@users.noreply.github.com> Date: Thu, 20 Feb 2025 21:42:08 +0900 Subject: [PATCH 07/54] =?UTF-8?q?:zap:=20=E8=BF=BD=E5=8A=A0:=20[SW2]=20?= =?UTF-8?q?=E6=AD=A6=E5=99=A8=E3=81=AE=E3=80=8C=E5=BF=85=E8=A6=81=E7=B2=BE?= =?UTF-8?q?=E7=A5=9E=E5=8A=9B=E3=80=8D=E3=81=AE=E6=A6=82=E5=BF=B5=E3=82=92?= =?UTF-8?q?=E3=82=B5=E3=83=9D=E3=83=BC=E3=83=88=20(#351)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: ViVi Co-authored-by: TALE <42292222+yutorize@users.noreply.github.com> --- _core/lib/sw2/edit-chara.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/_core/lib/sw2/edit-chara.js b/_core/lib/sw2/edit-chara.js index 3971299b9..67bc34456 100644 --- a/_core/lib/sw2/edit-chara.js +++ b/_core/lib/sw2/edit-chara.js @@ -449,6 +449,7 @@ function setLanguageDefault(){ } // ステータス計算 ---------------------------------------- let reqdStr = 0; +let reqdMnd = 0; let reqdStrHalf = 0; let stt = {}; let bonus = {} @@ -540,6 +541,7 @@ function calcStt() { } reqdStr = stt.totalStr; + reqdMnd = stt.totalMnd; reqdStrHalf = Math.ceil(reqdStr / 2); checkFeats(); @@ -1509,7 +1511,8 @@ function calcWeapon() { const category = form["weapon"+i+"Category"].value; const ownDex = form["weapon"+i+"Own"].checked ? 2 : 0; const note = form["weapon"+i+"Note"].value; - const weaponReqd = safeEval(form["weapon"+i+"Reqd"].value) || 0; + const weaponReqdRaw = form["weapon"+i+"Reqd"]?.value?.toString(); + const weaponReqd = (weaponReqdRaw.match(/^(\d+)w$/i) ? safeEval(RegExp.$1) : safeEval(weaponReqdRaw)) || 0; const classLv = lv[ SET.class[className]?.id ] || 0; let dex = (partNum ? stt.Dex+Number(form.sttPartA.value || 0) : stt.totalDex); let str = (partNum ? stt.Str+Number(form.sttPartC.value || 0) : stt.totalStr); @@ -1520,6 +1523,7 @@ function calcWeapon() { // 必筋チェック const maxReqd = (className === "フェンサー") ? reqdStrHalf + : /^\d+w$/i.test(weaponReqdRaw) ? reqdMnd : SET.class[className]?.accUnlock?.reqd ? stt['total'+SET.class[className]?.accUnlock?.reqd] : reqdStr; form["weapon"+i+"Reqd"].classList.toggle('error', weaponReqd > maxReqd + (equipMod.WeaponReqd||0)); From 094bb4d5176185620c99a056a87441774e5ced36 Mon Sep 17 00:00:00 2001 From: ViVi <44130782+ViVi-shark@users.noreply.github.com> Date: Thu, 20 Feb 2025 22:00:30 +0900 Subject: [PATCH 08/54] =?UTF-8?q?:bug:=20=E4=BF=AE=E6=AD=A3:=20[SW2]=20?= =?UTF-8?q?=E3=83=81=E3=83=A3=E3=83=83=E3=83=88=E3=83=91=E3=83=AC=E3=83=83?= =?UTF-8?q?=E3=83=88=E3=81=AB=E3=81=8A=E3=81=84=E3=81=A6=E3=80=81=E3=80=8A?= =?UTF-8?q?=E3=82=AF=E3=83=AA=E3=83=86=E3=82=A3=E3=82=AB=E3=83=AB=E3=82=AD?= =?UTF-8?q?=E3=83=A3=E3=82=B9=E3=83=88=E2=85=A0=E3=80=8B=E3=81=AE=E5=A0=B4?= =?UTF-8?q?=E5=90=88=E3=81=AF=E5=8D=8A=E6=B8=9B=E6=99=82=E3=81=AB=E3=82=AF?= =?UTF-8?q?=E3=83=AA=E3=83=86=E3=82=A3=E3=82=AB=E3=83=AB=E3=81=95=E3=81=9B?= =?UTF-8?q?=E3=81=AA=E3=81=84=20(#347)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: ViVi --- _core/lib/sw2/palette-sub.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_core/lib/sw2/palette-sub.pl b/_core/lib/sw2/palette-sub.pl index c2fea4238..6b62c605c 100644 --- a/_core/lib/sw2/palette-sub.pl +++ b/_core/lib/sw2/palette-sub.pl @@ -320,7 +320,7 @@ sub palettePreset { if ($id eq 'Fai' && $::pc{fairyContractEarth} && ($pow == 10 || $pow == 50)) { $text .= "k${pow}[12$activeCrit]+$magicPower".addNum($::pc{'magicDamageAdd'.$id})."+{物理魔法D修正}$activeDmg 物理ダメージ\n"; } - my $halfCrit = $activeName =~ /クリティカルキャスト/ ? "{魔法C}$activeCrit" : "13"; + my $halfCrit = $activeName =~ /クリティカルキャスト(?!(?:1|I(?:[^I]|$)|Ⅰ))/i ? "{魔法C}$activeCrit" : "13"; if ($bot{YTC}) { $half .= "k${pow}[$halfCrit]+$magicPower" . "//" . addNum($::pc{'magicDamageAdd'.$id}) . "+{魔法D修正}$activeDmg 半減\n"; } if ($bot{BCD}) { $half .= "k${pow}[$halfCrit]+$magicPower" . "h+(" . ($::pc{'magicDamageAdd'.$id} || '') . "+{魔法D修正}$activeDmg) 半減\n"; } } From 87757427b40c37ae4d220e53a2762167776b51df Mon Sep 17 00:00:00 2001 From: ViVi <44130782+ViVi-shark@users.noreply.github.com> Date: Thu, 20 Feb 2025 22:06:12 +0900 Subject: [PATCH 09/54] =?UTF-8?q?:zap:=20=E8=BF=BD=E5=8A=A0:=20[SW2]=20?= =?UTF-8?q?=E3=83=81=E3=83=A3=E3=83=83=E3=83=88=E3=83=91=E3=83=AC=E3=83=83?= =?UTF-8?q?=E3=83=88=E3=81=AB=E3=81=8A=E3=81=84=E3=81=A6=E3=80=81=E3=80=8A?= =?UTF-8?q?=E3=83=86=E3=82=A2=E3=83=AA=E3=83=B3=E3=82=B0=E3=82=AD=E3=83=A3?= =?UTF-8?q?=E3=82=B9=E3=83=88=E2=85=A1=E3=80=8B=E3=81=AB=E3=82=82=E3=80=8A?= =?UTF-8?q?=E3=82=AF=E3=83=AA=E3=83=86=E3=82=A3=E3=82=AB=E3=83=AB=E3=82=AD?= =?UTF-8?q?=E3=83=A3=E3=82=B9=E3=83=88=E2=85=A1=E3=80=8B=E3=81=A8=E5=90=8C?= =?UTF-8?q?=E6=A7=98=E3=81=AE=E5=8D=8A=E6=B8=9B=E6=99=82=E3=82=AF=E3=83=AA?= =?UTF-8?q?=E3=83=86=E3=82=A3=E3=82=AB=E3=83=AB=E6=9C=89=E5=8A=B9=E5=8C=96?= =?UTF-8?q?=E5=87=A6=E7=90=86=E3=82=92=E9=81=A9=E7=94=A8=E3=81=99=E3=82=8B?= =?UTF-8?q?=20(#349)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: ViVi Co-authored-by: TALE <42292222+yutorize@users.noreply.github.com> --- _core/lib/sw2/palette-sub.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_core/lib/sw2/palette-sub.pl b/_core/lib/sw2/palette-sub.pl index 6b62c605c..c498a180d 100644 --- a/_core/lib/sw2/palette-sub.pl +++ b/_core/lib/sw2/palette-sub.pl @@ -320,7 +320,7 @@ sub palettePreset { if ($id eq 'Fai' && $::pc{fairyContractEarth} && ($pow == 10 || $pow == 50)) { $text .= "k${pow}[12$activeCrit]+$magicPower".addNum($::pc{'magicDamageAdd'.$id})."+{物理魔法D修正}$activeDmg 物理ダメージ\n"; } - my $halfCrit = $activeName =~ /クリティカルキャスト(?!(?:1|I(?:[^I]|$)|Ⅰ))/i ? "{魔法C}$activeCrit" : "13"; + my $halfCrit = $activeName =~ /(?:クリティカル|テアリング)キャスト(?!(?:1|I(?:[^I]|$)|Ⅰ))/i ? "{魔法C}$activeCrit" : "13"; if ($bot{YTC}) { $half .= "k${pow}[$halfCrit]+$magicPower" . "//" . addNum($::pc{'magicDamageAdd'.$id}) . "+{魔法D修正}$activeDmg 半減\n"; } if ($bot{BCD}) { $half .= "k${pow}[$halfCrit]+$magicPower" . "h+(" . ($::pc{'magicDamageAdd'.$id} || '') . "+{魔法D修正}$activeDmg) 半減\n"; } } From 98eb6badfd4d5ee3268ad46ac8e048be341334ef Mon Sep 17 00:00:00 2001 From: ViVi <44130782+ViVi-shark@users.noreply.github.com> Date: Fri, 21 Feb 2025 17:00:25 +0900 Subject: [PATCH 10/54] =?UTF-8?q?:recycle:=20=E6=95=B4=E7=90=86:=20[SW2]?= =?UTF-8?q?=20=E3=83=81=E3=83=A3=E3=83=83=E3=83=88=E3=83=91=E3=83=AC?= =?UTF-8?q?=E3=83=83=E3=83=88=E8=BF=BD=E5=8A=A0=E3=82=AA=E3=83=97=E3=82=B7?= =?UTF-8?q?=E3=83=A7=E3=83=B3=E3=81=AE=E5=85=B1=E9=80=9A=E5=8C=96=20(#286)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: ViVi --- _core/lib/sw2.0/edit-chara.pl | 123 +------------------ _core/lib/sw2/edit-chara-palette-option.pl | 136 +++++++++++++++++++++ _core/lib/sw2/edit-chara.pl | 124 +------------------ 3 files changed, 140 insertions(+), 243 deletions(-) create mode 100644 _core/lib/sw2/edit-chara-palette-option.pl diff --git a/_core/lib/sw2.0/edit-chara.pl b/_core/lib/sw2.0/edit-chara.pl index e32054588..db1bd3e92 100644 --- a/_core/lib/sw2.0/edit-chara.pl +++ b/_core/lib/sw2.0/edit-chara.pl @@ -1571,127 +1571,8 @@ sub classInputBox { HTML sub chatPaletteFormOptional { - $pc{chatPaletteInsertNum} ||= 2; - $pc{paletteAttackNum} ||= 3; - $pc{paletteMagicNum} ||= 3; - my $html = <<"HTML"; -
    -

    プリセットの追加オプション

    -
    -

    一般技能の判定の出力設定

    -

    その行の技能のレベルと、選択したボーナスの組み合わせが追加されます

    - - -HTML - foreach ('TMPL',1 .. $pc{commonClassNum}){ - $html .= '' if $_ eq 'TMPL'; - } - $html .= <<"HTML"; -
    -
    -
    - 追加挿入 -
      -HTML - foreach ('TMPL',1 .. $pc{chatPaletteInsertNum}){ - $html .= '' if $_ eq 'TMPL'; - } - $html .= <<"HTML"; -
    - - @{[ input "chatPaletteInsertNum","hidden" ]} -
    -
    - 武器攻撃の追加オプション -

    宣言特技などの名称と修正を入力すると、それにもとづいた命中判定および威力算出の行が追加されます。

    - - - - -HTML - foreach ('TMPL',1 .. $pc{paletteAttackNum}){ - $html .= '' if $_ eq 'TMPL'; - } - $html .= <<"HTML"; -
    - 名称(宣言特技名など) - 命中修正 - C値修正 - ダメージ
    修正
    -
    出目修正 - 対象の武器 -
    - - @{[ input "paletteAttackNum","hidden" ]} -
    -
    - 魔法の追加オプション -

    宣言特技などの名称と修正を入力すると、それにもとづいた、行使判定および威力算出の行が追加されます。

    - - - - -HTML - foreach ('TMPL',1 .. $pc{paletteMagicNum}){ - $html .= '' if $_ eq 'TMPL'; - } - $html .= <<"HTML"; -
    - 名称(宣言特技名など) - 魔力修正 - 行使修正 - C値修正 - ダメージ
    修正
    -
    対象の魔法 -
    - - @{[ input "paletteMagicNum","hidden" ]} -
    -HTML + require($::core_dir . '/lib/sw2/edit-chara-palette-option.pl'); + return palette::chatPaletteFormOptional(\%pc); } # ヘルプ my $text_rule = <<"HTML"; diff --git a/_core/lib/sw2/edit-chara-palette-option.pl b/_core/lib/sw2/edit-chara-palette-option.pl new file mode 100644 index 000000000..faf8361ca --- /dev/null +++ b/_core/lib/sw2/edit-chara-palette-option.pl @@ -0,0 +1,136 @@ +use strict; +use utf8; +use open ":utf8"; + +package palette; + +sub chatPaletteFormOptional { + my %pc = %{shift;}; + + require($::core_dir . '/lib/edit.pl'); + + $::pc{chatPaletteInsertNum} = ($pc{chatPaletteInsertNum} ||= 2); + $::pc{paletteAttackNum} = ($pc{paletteAttackNum} ||= 3); + $::pc{paletteMagicNum} = ($pc{paletteMagicNum} ||= 3); + my $html = <<"HTML"; +
    +

    プリセットの追加オプション

    +
    +

    一般技能の判定の出力設定

    +

    その行の技能のレベルと、選択したボーナスの組み合わせが追加されます

    + + +HTML + foreach ('TMPL',1 .. $pc{commonClassNum}){ + $html .= '' if $_ eq 'TMPL'; + } + $html .= <<"HTML"; +
    +
    +
    + 追加挿入 +
      +HTML + foreach ('TMPL',1 .. $pc{chatPaletteInsertNum}){ + $html .= '' if $_ eq 'TMPL'; + } + $html .= <<"HTML"; +
    + + @{[ ::input "chatPaletteInsertNum","hidden" ]} +
    +
    + 武器攻撃の追加オプション +

    宣言特技などの名称と修正を入力すると、それにもとづいた命中判定および威力算出の行が追加されます。

    + + + + +HTML + foreach ('TMPL',1 .. $pc{paletteAttackNum}){ + $html .= '' if $_ eq 'TMPL'; + } + $html .= <<"HTML"; +
    + 名称(宣言特技名など) + 命中修正 + C値修正 + ダメージ
    修正
    +
    出目修正 + 対象の武器 +
    + + @{[ ::input "paletteAttackNum","hidden" ]} +
    +
    + 魔法の追加オプション +

    宣言特技などの名称と修正を入力すると、それにもとづいた、行使判定および威力算出の行が追加されます。

    + + + + +HTML + foreach ('TMPL',1 .. $pc{paletteMagicNum}){ + $html .= '' if $_ eq 'TMPL'; + } + $html .= <<"HTML"; +
    + 名称(宣言特技名など) + 魔力修正 + 行使修正 + C値修正 + ダメージ
    修正
    +
    対象の魔法 +
    + + @{[ ::input "paletteMagicNum","hidden" ]} +
    +
    +HTML +} + +1; diff --git a/_core/lib/sw2/edit-chara.pl b/_core/lib/sw2/edit-chara.pl index 2cd765ff0..624d44120 100644 --- a/_core/lib/sw2/edit-chara.pl +++ b/_core/lib/sw2/edit-chara.pl @@ -1677,128 +1677,8 @@ sub classInputBox { HTML sub chatPaletteFormOptional { - $pc{chatPaletteInsertNum} ||= 2; - $pc{paletteAttackNum} ||= 3; - $pc{paletteMagicNum} ||= 3; - my $html = <<"HTML"; -
    -

    プリセットの追加オプション

    -
    -

    一般技能の判定の出力設定

    -

    その行の技能のレベルと、選択したボーナスの組み合わせが追加されます

    - - -HTML - foreach ('TMPL',1 .. $pc{commonClassNum}){ - $html .= '' if $_ eq 'TMPL'; - } - $html .= <<"HTML"; -
    -
    -
    - 追加挿入 -
      -HTML - foreach ('TMPL',1 .. $pc{chatPaletteInsertNum}){ - $html .= '' if $_ eq 'TMPL'; - } - $html .= <<"HTML"; -
    - - @{[ input "chatPaletteInsertNum","hidden" ]} -
    -
    - 武器攻撃の追加オプション -

    宣言特技などの名称と修正を入力すると、それにもとづいた命中判定および威力算出の行が追加されます。

    - - - - -HTML - foreach ('TMPL',1 .. $pc{paletteAttackNum}){ - $html .= '' if $_ eq 'TMPL'; - } - $html .= <<"HTML"; -
    - 名称(宣言特技名など) - 命中修正 - C値修正 - ダメージ
    修正
    -
    出目修正 - 対象の武器 -
    - - @{[ input "paletteAttackNum","hidden" ]} -
    -
    - 魔法の追加オプション -

    宣言特技などの名称と修正を入力すると、それにもとづいた、行使判定および威力算出の行が追加されます。

    - - - - -HTML - foreach ('TMPL',1 .. $pc{paletteMagicNum}){ - $html .= '' if $_ eq 'TMPL'; - } - $html .= <<"HTML"; -
    - 名称(宣言特技名など) - 魔力修正 - 行使修正 - C値修正 - ダメージ
    修正
    -
    対象の魔法 -
    - - @{[ input "paletteMagicNum","hidden" ]} -
    -
    -HTML + require($::core_dir . '/lib/sw2/edit-chara-palette-option.pl'); + return palette::chatPaletteFormOptional(\%pc); } # ヘルプ From 868ee23065cc8af3bda37df759997a44a5082a7d Mon Sep 17 00:00:00 2001 From: ViVi <44130782+ViVi-shark@users.noreply.github.com> Date: Fri, 21 Feb 2025 17:58:49 +0900 Subject: [PATCH 11/54] =?UTF-8?q?:zap:=20=E8=BF=BD=E5=8A=A0:=20[SW2]=20?= =?UTF-8?q?=E3=83=81=E3=83=A3=E3=83=83=E3=83=88=E3=83=91=E3=83=AC=E3=83=83?= =?UTF-8?q?=E3=83=88=E3=81=AB=E3=81=8A=E3=81=91=E3=82=8B=E9=AD=94=E6=B3=95?= =?UTF-8?q?=E3=81=AE=E8=BF=BD=E5=8A=A0=E3=82=AA=E3=83=97=E3=82=B7=E3=83=A7?= =?UTF-8?q?=E3=83=B3=E3=81=AB=E3=80=81=E3=80=8C=E5=A8=81=E5=8A=9B=E3=80=8D?= =?UTF-8?q?=E3=82=92=E6=93=8D=E4=BD=9C=E3=81=99=E3=82=8B=E9=A0=85=E7=9B=AE?= =?UTF-8?q?=20(#346)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: ViVi Co-authored-by: TALE <42292222+yutorize@users.noreply.github.com> --- _core/lib/sw2/edit-chara-palette-option.pl | 2 + _core/lib/sw2/palette-sub.pl | 51 +++++++++++++++++++--- _core/skin/sw2/css/edit.css | 1 + 3 files changed, 47 insertions(+), 7 deletions(-) diff --git a/_core/lib/sw2/edit-chara-palette-option.pl b/_core/lib/sw2/edit-chara-palette-option.pl index faf8361ca..2723a5055 100644 --- a/_core/lib/sw2/edit-chara-palette-option.pl +++ b/_core/lib/sw2/edit-chara-palette-option.pl @@ -102,6 +102,7 @@ sub chatPaletteFormOptional { 名称(宣言特技名など) 魔力修正 行使修正 + 威力修正 C値修正 ダメージ
    修正
    対象の魔法 @@ -114,6 +115,7 @@ sub chatPaletteFormOptional { $html .= ''.::input("paletteMagic${_}Name" ,'','','onchange="setChatPalette()"'); $html .= ''.::input("paletteMagic${_}Power",'','','onchange="setChatPalette()"'); $html .= ''.::input("paletteMagic${_}Cast" ,'','','onchange="setChatPalette()"'); + $html .= ''.::input("paletteMagic${_}Rate" ,'','','onchange="setChatPalette()"'); $html .= ''.::input("paletteMagic${_}Crit" ,'','','onchange="setChatPalette()"'); $html .= ''.::input("paletteMagic${_}Dmg" ,'','','onchange="setChatPalette()"'); $html .= ''; diff --git a/_core/lib/sw2/palette-sub.pl b/_core/lib/sw2/palette-sub.pl index c498a180d..83ccfd241 100644 --- a/_core/lib/sw2/palette-sub.pl +++ b/_core/lib/sw2/palette-sub.pl @@ -290,12 +290,37 @@ sub palettePreset { my $activeName = $::pc{'paletteMagic'.$paNum.'Name'} ? "+$::pc{'paletteMagic'.$paNum.'Name'}" : ''; my $activePower = $::pc{'paletteMagic'.$paNum.'Power'} ? optimizeOperatorFirst("+$::pc{'paletteMagic'.$paNum.'Power'}") : ''; my $activeCrit = $::pc{'paletteMagic'.$paNum.'Crit' } ? optimizeOperatorFirst("+$::pc{'paletteMagic'.$paNum.'Crit' }") : ''; + my $activeRate = $::pc{'paletteMagic'.$paNum.'Rate' } ? optimizeOperatorFirst("+$::pc{'paletteMagic'.$paNum.'Rate' }") : ''; my $activeDmg = $::pc{'paletteMagic'.$paNum.'Dmg' } ? optimizeOperatorFirst("+$::pc{'paletteMagic'.$paNum.'Dmg' }") : ''; my $activeRoll = $::pc{'paletteMagic'.$paNum.'Roll' } ? '#'.optimizeOperatorFirst("+$::pc{'paletteMagic'.$paNum.'Roll' }") : ''; my $magicPower = "{$power}" . ($name =~ /魔/ ? $activePower :""); - + + sub modifyRate { + my $base = shift; + my $offset = shift; + + if ($offset ne '') { + my $expression = "${base}+(${offset})"; + + if ($offset =~ /^[-+\d()]+$/) { + # 単純な数値なら計算してしまう(威力の上限・下限を考慮するため). + my $modified = s_eval($expression); + $modified = 0 if $modified < 0; + $modified = 100 if $modified > 100; + return $modified; + } + else { + # 計算できない場合は式として表現しておく. + return "(${expression})"; + } + } + + return $base; + } + my $half; + my $lastModifiedRate; foreach my $pow (sort {$a <=> $b} keys %{$pows{$id}}) { if($pows{$id}{$pow} =~ /^[0-9]+$/){ next if($pows{$id}{$pow} > $::pc{'lv'.$id} && $id ne 'Fai'); @@ -313,16 +338,21 @@ sub palettePreset { } if($id eq 'Bar'){ $pow += $::pc{finaleEnhance} || 0; } - $text .= "k${pow}[{魔法C}$activeCrit]+$magicPower".addNum($::pc{'magicDamageAdd'.$id})."+{魔法D修正}$activeDmg ダメージ\n"; + my $modifiedRate = modifyRate($pow, $activeRate); + next if $modifiedRate eq $lastModifiedRate; + + $text .= "k${modifiedRate}\[{魔法C}$activeCrit]+$magicPower".addNum($::pc{'magicDamageAdd'.$id})."+{魔法D修正}$activeDmg ダメージ\n"; if ($id eq 'Sor' && $pow == 30 && $::pc{lvSor} >= 12) { - $text .= "k${pow}[10$activeCrit]+$magicPower".addNum($::pc{'magicDamageAdd'.$id})."+{物理魔法D修正}$activeDmg 物理ダメージ\n"; + $text .= "k${modifiedRate}\[10$activeCrit]+$magicPower".addNum($::pc{'magicDamageAdd'.$id})."+{物理魔法D修正}$activeDmg 物理ダメージ\n"; } if ($id eq 'Fai' && $::pc{fairyContractEarth} && ($pow == 10 || $pow == 50)) { - $text .= "k${pow}[12$activeCrit]+$magicPower".addNum($::pc{'magicDamageAdd'.$id})."+{物理魔法D修正}$activeDmg 物理ダメージ\n"; + $text .= "k${modifiedRate}\[12$activeCrit]+$magicPower".addNum($::pc{'magicDamageAdd'.$id})."+{物理魔法D修正}$activeDmg 物理ダメージ\n"; } my $halfCrit = $activeName =~ /(?:クリティカル|テアリング)キャスト(?!(?:1|I(?:[^I]|$)|Ⅰ))/i ? "{魔法C}$activeCrit" : "13"; - if ($bot{YTC}) { $half .= "k${pow}[$halfCrit]+$magicPower" . "//" . addNum($::pc{'magicDamageAdd'.$id}) . "+{魔法D修正}$activeDmg 半減\n"; } - if ($bot{BCD}) { $half .= "k${pow}[$halfCrit]+$magicPower" . "h+(" . ($::pc{'magicDamageAdd'.$id} || '') . "+{魔法D修正}$activeDmg) 半減\n"; } + if ($bot{YTC}) { $half .= "k${modifiedRate}\[$halfCrit]+$magicPower" . "//" . addNum($::pc{'magicDamageAdd'.$id}) . "+{魔法D修正}$activeDmg 半減\n"; } + if ($bot{BCD}) { $half .= "k${modifiedRate}\[$halfCrit]+$magicPower" . "h+(" . ($::pc{'magicDamageAdd'.$id} || '') . "+{魔法D修正}$activeDmg) 半減\n"; } + + $lastModifiedRate = $modifiedRate; } $text .= $half; if($id eq 'Dru'){ @@ -353,6 +383,7 @@ sub palettePreset { } } + $lastModifiedRate = undef; foreach my $pow (sort {$a <=> $b} keys %{$heals{$id}}) { if($heals{$id}{$pow} =~ /^[0-9]+$/){ next if($::pc{'lv'.$id} < $heals{$id}{$pow}); @@ -365,7 +396,13 @@ sub palettePreset { } next if !$exist; } - $text .= "k${pow}[13]+$magicPower+{回復量修正} 回復量\n" + + my $modifiedRate = modifyRate($pow, $activeRate); + next if $modifiedRate eq $lastModifiedRate; + + $text .= "k${modifiedRate}\[13]+$magicPower+{回復量修正} 回復量\n" + + $lastModifiedRate = $modifiedRate; } $text =~ s/^(k[0-9]+)\[(.+?)\]/$1\[($2)\]/gm if $bot{BCD}; diff --git a/_core/skin/sw2/css/edit.css b/_core/skin/sw2/css/edit.css index 805d38217..3655948f4 100644 --- a/_core/skin/sw2/css/edit.css +++ b/_core/skin/sw2/css/edit.css @@ -1392,6 +1392,7 @@ article > form > hr { &.name { width: 14em; } &.power { width: 6em; } &.cast { width: 6em; } + &.rate { width: 6em; } &.crit { width: 6em; } &.dmg { width: 6em; } &.roll { width: 6em; } From 65671cae711b9a7a45ec3aa4ed62769a8eeb7030 Mon Sep 17 00:00:00 2001 From: ViVi <44130782+ViVi-shark@users.noreply.github.com> Date: Fri, 21 Feb 2025 18:12:29 +0900 Subject: [PATCH 12/54] =?UTF-8?q?:zap:=20=E8=BF=BD=E5=8A=A0:=20[SW2]=20?= =?UTF-8?q?=E3=83=81=E3=83=A3=E3=83=83=E3=83=88=E3=83=91=E3=83=AC=E3=83=83?= =?UTF-8?q?=E3=83=88=E3=81=AB=E3=81=8A=E3=81=91=E3=82=8B=E9=AD=94=E6=B3=95?= =?UTF-8?q?=E3=81=AE=E8=BF=BD=E5=8A=A0=E3=82=AA=E3=83=97=E3=82=B7=E3=83=A7?= =?UTF-8?q?=E3=83=B3=E3=81=AB=E3=80=81=E5=87=BA=E7=9B=AE=E3=82=92=E6=93=8D?= =?UTF-8?q?=E4=BD=9C=E3=81=99=E3=82=8B=E9=A0=85=E7=9B=AE=20(#348)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: ViVi Co-Authored-By: TALE <42292222+yutorize@users.noreply.github.com> --- _core/lib/sw2/edit-chara-palette-option.pl | 2 ++ _core/lib/sw2/palette-sub.pl | 14 +++++++------- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/_core/lib/sw2/edit-chara-palette-option.pl b/_core/lib/sw2/edit-chara-palette-option.pl index 2723a5055..698b40a90 100644 --- a/_core/lib/sw2/edit-chara-palette-option.pl +++ b/_core/lib/sw2/edit-chara-palette-option.pl @@ -105,6 +105,7 @@ sub chatPaletteFormOptional { 威力修正 C値修正 ダメージ
    修正
    + 出目修正 対象の魔法 HTML @@ -118,6 +119,7 @@ sub chatPaletteFormOptional { $html .= ''.::input("paletteMagic${_}Rate" ,'','','onchange="setChatPalette()"'); $html .= ''.::input("paletteMagic${_}Crit" ,'','','onchange="setChatPalette()"'); $html .= ''.::input("paletteMagic${_}Dmg" ,'','','onchange="setChatPalette()"'); + $html .= ''.::input("paletteMagic${_}Roll" ,'','','onchange="setChatPalette()"'); $html .= ''; foreach my $name (@data::class_caster){ next if (!$data::class{$name}{magic}{jName}); diff --git a/_core/lib/sw2/palette-sub.pl b/_core/lib/sw2/palette-sub.pl index 83ccfd241..46435f70f 100644 --- a/_core/lib/sw2/palette-sub.pl +++ b/_core/lib/sw2/palette-sub.pl @@ -318,7 +318,7 @@ sub palettePreset { return $base; } - + my $half; my $lastModifiedRate; foreach my $pow (sort {$a <=> $b} keys %{$pows{$id}}) { @@ -341,16 +341,16 @@ sub palettePreset { my $modifiedRate = modifyRate($pow, $activeRate); next if $modifiedRate eq $lastModifiedRate; - $text .= "k${modifiedRate}\[{魔法C}$activeCrit]+$magicPower".addNum($::pc{'magicDamageAdd'.$id})."+{魔法D修正}$activeDmg ダメージ\n"; + $text .= "k${modifiedRate}\[{魔法C}$activeCrit]+$magicPower".addNum($::pc{'magicDamageAdd'.$id})."+{魔法D修正}$activeDmg${activeRoll} ダメージ\n"; if ($id eq 'Sor' && $pow == 30 && $::pc{lvSor} >= 12) { - $text .= "k${modifiedRate}\[10$activeCrit]+$magicPower".addNum($::pc{'magicDamageAdd'.$id})."+{物理魔法D修正}$activeDmg 物理ダメージ\n"; + $text .= "k${modifiedRate}\[10$activeCrit]+$magicPower".addNum($::pc{'magicDamageAdd'.$id})."+{物理魔法D修正}$activeDmg${activeRoll} 物理ダメージ\n"; } if ($id eq 'Fai' && $::pc{fairyContractEarth} && ($pow == 10 || $pow == 50)) { - $text .= "k${modifiedRate}\[12$activeCrit]+$magicPower".addNum($::pc{'magicDamageAdd'.$id})."+{物理魔法D修正}$activeDmg 物理ダメージ\n"; + $text .= "k${modifiedRate}\[12$activeCrit]+$magicPower".addNum($::pc{'magicDamageAdd'.$id})."+{物理魔法D修正}$activeDmg${activeRoll} 物理ダメージ\n"; } my $halfCrit = $activeName =~ /(?:クリティカル|テアリング)キャスト(?!(?:1|I(?:[^I]|$)|Ⅰ))/i ? "{魔法C}$activeCrit" : "13"; - if ($bot{YTC}) { $half .= "k${modifiedRate}\[$halfCrit]+$magicPower" . "//" . addNum($::pc{'magicDamageAdd'.$id}) . "+{魔法D修正}$activeDmg 半減\n"; } - if ($bot{BCD}) { $half .= "k${modifiedRate}\[$halfCrit]+$magicPower" . "h+(" . ($::pc{'magicDamageAdd'.$id} || '') . "+{魔法D修正}$activeDmg) 半減\n"; } + if ($bot{YTC}) { $half .= "k${modifiedRate}\[$halfCrit]+$magicPower" . "//" . addNum($::pc{'magicDamageAdd'.$id}) . "+{魔法D修正}$activeDmg${activeRoll} 半減\n"; } + if ($bot{BCD}) { $half .= "k${modifiedRate}\[$halfCrit]+$magicPower" . "h+(" . ($::pc{'magicDamageAdd'.$id} || '') . "+{魔法D修正}$activeDmg)${activeRoll} 半減\n"; } $lastModifiedRate = $modifiedRate; } @@ -400,7 +400,7 @@ sub palettePreset { my $modifiedRate = modifyRate($pow, $activeRate); next if $modifiedRate eq $lastModifiedRate; - $text .= "k${modifiedRate}\[13]+$magicPower+{回復量修正} 回復量\n" + $text .= "k${modifiedRate}\[13]+$magicPower+{回復量修正}${activeRoll} 回復量\n"; $lastModifiedRate = $modifiedRate; } From a85bb56a96d07bf403d09e5afc9a0889732bbe56 Mon Sep 17 00:00:00 2001 From: ViVi <44130782+ViVi-shark@users.noreply.github.com> Date: Fri, 21 Feb 2025 20:25:19 +0900 Subject: [PATCH 13/54] =?UTF-8?q?:bug:=20=E4=BF=AE=E6=AD=A3:=20[SW2]=20?= =?UTF-8?q?=E7=B7=A8=E9=9B=86=E7=94=BB=E9=9D=A2=E3=81=AB=E3=81=8A=E3=81=84?= =?UTF-8?q?=E3=81=A6=E3=80=81=E8=A4=87=E6=95=B0=E9=83=A8=E4=BD=8D=E3=81=AE?= =?UTF-8?q?=EF=BC=B0=EF=BC=A3=E3=83=87=E3=83=BC=E3=82=BF=E3=81=AE=E3=82=B3?= =?UTF-8?q?=E3=82=A2=E9=83=A8=E4=BD=8D=E3=81=AE=EF=BC=A8=EF=BC=B0=EF=BC=8F?= =?UTF-8?q?=EF=BC=AD=EF=BC=B0=E3=81=8C=20NaN=20=E3=81=AB=E3=81=AA=E3=82=8B?= =?UTF-8?q?=E5=A0=B4=E5=90=88=E3=81=8C=E3=81=82=E3=82=8B=E4=B8=8D=E5=85=B7?= =?UTF-8?q?=E5=90=88=20(#336)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 直接修正記法によって生命力/精神力が増減していないとき、それぞれHP/MPが NaN となっていた Co-authored-by: ViVi --- _core/lib/sw2/edit-chara.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_core/lib/sw2/edit-chara.js b/_core/lib/sw2/edit-chara.js index 67bc34456..14888fbb3 100644 --- a/_core/lib/sw2/edit-chara.js +++ b/_core/lib/sw2/edit-chara.js @@ -1384,8 +1384,8 @@ function calcParts(){ } // コア if(form.partCore.value == num){ - hp += subStt.hpBase + subStt.hpAutoAdd - stt.addD - equipMod.D + Number(form.sttPartD.value||0); - mp += subStt.mpBase + subStt.mpAutoAdd - stt.addF - equipMod.F + Number(form.sttPartF.value||0); + hp += subStt.hpBase + subStt.hpAutoAdd - stt.addD - (equipMod.D ?? 0) + Number(form.sttPartD.value||0); + mp += subStt.mpBase + subStt.mpAutoAdd - stt.addF - (equipMod.F ?? 0) + Number(form.sttPartF.value||0); if(raceAbilities.includes('蠍人の身体')){ def = 0; hp += subStt.hpAccessory; From 88c31e045eab335f0767b273f6b532f20135b265 Mon Sep 17 00:00:00 2001 From: TALE <42292222+yutorize@users.noreply.github.com> Date: Fri, 21 Mar 2025 19:18:59 +0900 Subject: [PATCH 14/54] =?UTF-8?q?:coffin:=20=E5=89=8A=E9=99=A4:=20?= =?UTF-8?q?=E3=83=87=E3=83=83=E3=83=89=E3=82=B3=E3=83=BC=E3=83=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _core/lib/sw2.0/edit-chara.pl | 2 -- _core/lib/sw2/edit-chara.pl | 2 -- 2 files changed, 4 deletions(-) diff --git a/_core/lib/sw2.0/edit-chara.pl b/_core/lib/sw2.0/edit-chara.pl index db1bd3e92..ea104aa40 100644 --- a/_core/lib/sw2.0/edit-chara.pl +++ b/_core/lib/sw2.0/edit-chara.pl @@ -109,8 +109,6 @@ $pc{accuracyEnhance} ||= 0; $pc{evasiveManeuver} ||= 0; -$pc{tenacity} ||= 0; -$pc{capacity} ||= 0; ### 改行処理 -------------------------------------------------- $pc{items} =~ s/<br>/\n/g; diff --git a/_core/lib/sw2/edit-chara.pl b/_core/lib/sw2/edit-chara.pl index 624d44120..8094af609 100644 --- a/_core/lib/sw2/edit-chara.pl +++ b/_core/lib/sw2/edit-chara.pl @@ -110,8 +110,6 @@ $pc{accuracyEnhance} ||= 0; $pc{evasiveManeuver} ||= 0; -$pc{tenacity} ||= 0; -$pc{capacity} ||= 0; $pc{unlockAbove16} = 1 if $pc{level} > 15; From ae682e9e3155b488b0ae87c82641ad3390296960 Mon Sep 17 00:00:00 2001 From: TALE <42292222+yutorize@users.noreply.github.com> Date: Fri, 21 Mar 2025 19:21:40 +0900 Subject: [PATCH 15/54] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20=E6=95=B4=E7=90=86:?= =?UTF-8?q?=20[SW2]=20=E8=87=AA=E5=8B=95=E7=BF=92=E5=BE=97=E7=89=B9?= =?UTF-8?q?=E6=8A=80=E5=91=A8=E3=82=8A=E3=81=AE=E5=87=A6=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - data-class.plである程度制御できるようにする --- _core/lib/sw2.0/data-class.pl | 14 ++++++++ _core/lib/sw2/calc-chara.pl | 39 ++++++++-------------- _core/lib/sw2/data-class.pl | 61 +++++++++++++++++++++++++++++++++++ _core/lib/sw2/edit-chara.js | 13 +++++++- 4 files changed, 100 insertions(+), 27 deletions(-) diff --git a/_core/lib/sw2.0/data-class.pl b/_core/lib/sw2.0/data-class.pl index 3482653d6..3d77db91c 100644 --- a/_core/lib/sw2.0/data-class.pl +++ b/_core/lib/sw2.0/data-class.pl @@ -21,6 +21,20 @@ package data; ); ### 技能詳細データ -------------------------------------------------- +$data::class{'グラップラー'}{feats} = [ + ['追加攻撃',1], + ['投げ攻撃',1], + ['鎧貫き',5], + ['カウンター',7], + ['バトルマスター',13], +]; +$data::class{'レンジャー'}{feats} = { + ['治癒適性',5], + ['不屈',7], + ['ポーションマスター',9], + ['韋駄天',12], + ['縮地',15], +}; $data::class{'スカウト'}{package} = { Dex => { name => '器用', stt => 'A' }, Agi => { name => '敏捷', stt => 'B', initiative => 1 }, diff --git a/_core/lib/sw2/calc-chara.pl b/_core/lib/sw2/calc-chara.pl index 5ee0543b5..7c0889ab7 100644 --- a/_core/lib/sw2/calc-chara.pl +++ b/_core/lib/sw2/calc-chara.pl @@ -369,32 +369,19 @@ sub data_calc { ### 戦闘特技 -------------------------------------------------- ## 自動習得 - my @abilities; - if($pc{lvFig} >= 7) { push(@abilities, "タフネス"); } - if($pc{lvGra} >= 1) { push(@abilities, "追加攻撃"); } - if($pc{lvGra} >= 1 && $::SW2_0) { push(@abilities, "投げ攻撃"); } - if($pc{lvGra} >= 5 && $::SW2_0) { push(@abilities, "鎧貫き"); } - if($pc{lvGra} >= 7) { push(@abilities, "カウンター"); } - if($pc{lvBat} >= 7) { push(@abilities, "舞い流し"); } - if($pc{lvFig} >=13 || $pc{lvGra} >=13 || $pc{lvBat} >=13) { push(@abilities, "バトルマスター"); } - if($pc{lvCaster} >= 11){ push(@abilities, "ルーンマスター"); } - if($pc{lvSco} >= 5) { push(@abilities, $pc{combatFeatsExcSco5} || "トレジャーハント"); } - if($pc{lvSco} >= 7) { push(@abilities, "ファストアクション"); } - if($pc{lvSco} >=12) { push(@abilities, "トレジャーマスター"); } - if($pc{lvSco} >=15) { push(@abilities, "匠の技"); } - if($pc{lvSco} >= 9) { push(@abilities, "影走り"); } - if($pc{lvRan} >= 5) { push(@abilities, $pc{combatFeatsExcRan5} || ($::SW2_0?"治癒適性":"サバイバビリティ")); } - if($pc{lvRan} >= 7) { push(@abilities, "不屈"); } - if($pc{lvRan} >= 9) { push(@abilities, "ポーションマスター"); } - if($pc{lvRan} >=12) { push(@abilities, ($::SW2_0?"韋駄天":"縮地")); } - if($pc{lvRan} >=15) { push(@abilities, ($::SW2_0?"縮地":"ランアンドガン")); } - if($pc{lvSag} >= 5) { push(@abilities, $pc{combatFeatsExcSag5} || "鋭い目"); } - if($pc{lvSag} >= 7) { push(@abilities, "弱点看破"); } - if($pc{lvSag} >= 9) { push(@abilities, "マナセーブ"); } - if($pc{lvSag} >=12) { push(@abilities, "マナ耐性"); } - if($pc{lvSag} >=15) { push(@abilities, "賢人の知恵"); } + my @feats; + foreach my $class (@data::class_names){ + my $id = $data::class{$class}{id}; + foreach my $data (@{$data::class{$class}{feats}}){ + if($pc{'lv'.$id} >= $data->[1]){ + push(@feats, $pc{'combatFeatsExc'.$id.$data->[1]} || $data->[0]); + } + } + } + my %hasFeats; + @feats = grep { ! $hasFeats{ $_ }++ } @feats; $" = ','; - $pc{combatFeatsAuto} = "@abilities"; + $pc{combatFeatsAuto} = "@feats"; ## 選択特技による補正 { foreach my $i (@set::feats_lv) { @@ -465,7 +452,7 @@ sub data_calc { ## HP $pc{hpBase} = $pc{level}*3 + $pc{sttVit} + $pc{sttAddD} + $pc{sttEquipD}; $pc{hpAddTotal} = s_eval($pc{hpAdd}) + $pc{tenacity} + $pc{hpAccessory} + $pc{seekerAbilityHpMp}; - $pc{hpAddTotal} += 15 if $pc{lvFig} >= 7; #タフネス + $pc{hpAddTotal} += 15 if $hasFeats{'タフネス'}; $pc{hpTotal} = $pc{hpBase} + $pc{hpAddTotal}; ## MP $pc{mpBase} = $lv_caster_total*3 + $pc{sttMnd} + $pc{sttAddF} + $pc{sttEquipF}; diff --git a/_core/lib/sw2/data-class.pl b/_core/lib/sw2/data-class.pl index 99a2c6dd9..d736d2710 100644 --- a/_core/lib/sw2/data-class.pl +++ b/_core/lib/sw2/data-class.pl @@ -91,12 +91,21 @@ package data; expTable => 'A', id => 'Fig', eName => 'fighter', + feats => [ + ['タフネス',7], + ['バトルマスター',13], + ], }, 'グラップラー' => { type => 'weapon-user', expTable => 'A', id => 'Gra', eName => 'grappler', + feats => [ + ['追加攻撃',1], + ['カウンター',7], + ['バトルマスター',13], + ], }, 'バトルダンサー' => { '2.5' => 1, @@ -104,6 +113,10 @@ package data; expTable => 'A', id => 'Bat', eName => 'battledancer', + feats => [ + ['舞い流し',7], + ['バトルマスター',13], + ], }, 'フェンサー' => { type => 'weapon-user', @@ -130,6 +143,9 @@ package data; language => { '魔法文明語' => { talk => 1, read => 1 }, }, + feats => [ + ['ルーンマスター',11], + ], }, 'コンジャラー' => { type => 'magic-user', @@ -143,6 +159,9 @@ package data; language => { '魔法文明語' => { talk => 1, read => 1 }, }, + feats => [ + ['ルーンマスター',11], + ], }, 'ウィザード' => { type => 'magic-user', @@ -163,6 +182,9 @@ package data; jName => '神聖魔法', eName => 'holypray', }, + feats => [ + ['ルーンマスター',11], + ], }, 'フェアリーテイマー' => { type => 'magic-user', @@ -176,6 +198,9 @@ package data; language => { '妖精語' => { talk => 1 }, }, + feats => [ + ['ルーンマスター',11], + ], }, 'マギテック' => { type => 'magic-user', @@ -189,6 +214,9 @@ package data; language => { '魔動機文明語' => { talk => 1, read => 1 }, }, + feats => [ + ['ルーンマスター',11], + ], }, 'スカウト' => { expTable => 'B', @@ -199,6 +227,13 @@ package data; Agi => { name => '運動', stt => 'B', initiative => 1 }, Obs => { name => '観察', stt => 'E' }, }, + feats => [ + ['トレジャーハント',5], + ['ファストアクション',7], + ['影走り',9], + ['トレジャーマスター',12], + ['匠の技',15], + ], }, 'レンジャー' => { expTable => 'B', @@ -209,6 +244,13 @@ package data; Agi => { name => '運動', stt => 'B' }, Obs => { name => '観察', stt => 'E' }, }, + feats => [ + ['サバイバビリティ',5], + ['不屈',7], + ['ポーションマスター',9], + ['縮地',12], + ['ランアンドガン',15], + ], }, 'セージ' => { expTable => 'B', @@ -220,6 +262,13 @@ package data; package => { Kno => { name => '知識', stt => 'E', monsterLore => 1 }, }, + feats => [ + ['鋭い目',5], + ['弱点看破',7], + ['マナセーブ',9], + ['マナ耐性',12], + ['賢人の知恵',15], + ], }, 'エンハンサー' => { expTable => 'B', @@ -434,6 +483,9 @@ package data; jName => '森羅魔法', eName => 'druidry', }, + feats => [ + ['ルーンマスター',11], + ], }, 'デーモンルーラー' => { type => 'magic-user', @@ -450,6 +502,9 @@ package data; '魔神語' => { talk => 1 }, '魔法文明語' => { read => 1 }, }, + feats => [ + ['ルーンマスター',11], + ], }, 'ジオマンサー' => { '2.5' => 1, @@ -599,6 +654,9 @@ package data; language => { '魔神語' => { talk => 1 }, }, + feats => [ + ['ルーンマスター',11], + ], }, 'ダークハンター' => { expTable => 'B', @@ -889,6 +947,9 @@ package data; [13,"死者の奇跡",'モーリ=モンストルム'], ], }, + feats => [ + ['ルーンマスター',11], + ], }, 'アーティザン' => { '2.0' => 1, diff --git a/_core/lib/sw2/edit-chara.js b/_core/lib/sw2/edit-chara.js index 14888fbb3..f73bc7f0f 100644 --- a/_core/lib/sw2/edit-chara.js +++ b/_core/lib/sw2/edit-chara.js @@ -561,6 +561,17 @@ function checkFeats(){ console.log('checkFeats()'); feats = {}; + // 自動習得 + for(const key of SET.classNames){ + const cId = SET.class[key].id; + for(const data of SET.class[key]?.feats || []){ + if(lv[cId] >= data[1]){ + feats[data[0]] = true; + } + } + } + + // 選択習得 const featsVagrantsOn = form.featsVagrantsOn.checked; const featsZeroOn = form.featsZeroOn.checked; document.querySelectorAll(`#combat-feats option.vagrants` ).forEach(obj=>{ obj.style.display = featsVagrantsOn ? '' : 'none'; }); @@ -1125,7 +1136,7 @@ function calcSubStt() { subStt.mpBase = (raceAbilities.includes('溢れるマナ')) ? (level * 3 + stt.totalMnd) : ( levelCasters.reduce((a,x) => a+x,0) * 3 + stt.totalMnd ); - subStt.hpAutoAdd = (feats['頑強'] || 0) + (lv['Fig'] >= 7 ? 15 : 0) + seekerHpMpAdd; + subStt.hpAutoAdd = (feats['頑強'] || 0) + (feats['タフネス'] ? 15 : 0) + seekerHpMpAdd; subStt.mpAutoAdd = (feats['キャパシティ'] || 0) + raceAbilityMp + seekerHpMpAdd; subStt.hpAccessory = 0; subStt.mpAccessory = 0; From fabaf6005e1a91286c617c89a34fb74751c1aac8 Mon Sep 17 00:00:00 2001 From: TALE <42292222+yutorize@users.noreply.github.com> Date: Sat, 22 Mar 2025 20:59:09 +0900 Subject: [PATCH 16/54] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20=E6=95=B4=E7=90=86:?= =?UTF-8?q?=20[SW2]=20=E3=83=95=E3=82=A7=E3=83=B3=E3=82=B5=E3=83=BC?= =?UTF-8?q?=E6=8A=80=E8=83=BD=E5=91=A8=E3=82=8A=E3=81=AE=E5=87=A6=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - フェンサー技能固有の処理にせず、data-class.plである程度制御できるようにする --- _core/lib/sw2.0/edit-chara.pl | 2 +- _core/lib/sw2/data-class.pl | 2 ++ _core/lib/sw2/edit-chara.js | 15 ++++++++------- _core/lib/sw2/edit-chara.pl | 2 +- _core/lib/sw2/view-chara.pl | 4 ++-- 5 files changed, 14 insertions(+), 11 deletions(-) diff --git a/_core/lib/sw2.0/edit-chara.pl b/_core/lib/sw2.0/edit-chara.pl index ea104aa40..915fdbac3 100644 --- a/_core/lib/sw2.0/edit-chara.pl +++ b/_core/lib/sw2.0/edit-chara.pl @@ -955,7 +955,7 @@ sub classInputBox { 0 0 ― - @{[ $name eq 'フェンサー' ? '-1' : '―' ]} + @{[ $data::class{$name}{critMod} || '―' ]} ― HTML } diff --git a/_core/lib/sw2/data-class.pl b/_core/lib/sw2/data-class.pl index d736d2710..b5f90a19c 100644 --- a/_core/lib/sw2/data-class.pl +++ b/_core/lib/sw2/data-class.pl @@ -123,6 +123,8 @@ package data; expTable => 'B', id => 'Fen', eName => 'fencer', + reqdHalf => 1, + critMod => -1, }, 'シューター' => { type => 'weapon-user', diff --git a/_core/lib/sw2/edit-chara.js b/_core/lib/sw2/edit-chara.js index f73bc7f0f..c729932cb 100644 --- a/_core/lib/sw2/edit-chara.js +++ b/_core/lib/sw2/edit-chara.js @@ -1482,10 +1482,10 @@ function calcAttack() { document.getElementById(`attack-${eName}`).style.display = display; document.getElementById(`attack-${eName}-str`).textContent - = (id == 'Fen' ? reqdStrHalf - : SET.class[name]?.accUnlock?.reqd ? stt['total'+SET.class[name]?.accUnlock?.reqd] - : reqdStr) - + (equipMod.WeaponReqd ? `+${equipMod.WeaponReqd}` : ''); + = ( SET.class[name]?.reqdStrHalf ? reqdStrHalf + : SET.class[name]?.accUnlock?.reqd ? stt['total'+SET.class[name]?.accUnlock?.reqd] + : reqdStr + ) + (equipMod.WeaponReqd ? `+${equipMod.WeaponReqd}` : ''); document.getElementById(`attack-${eName}-acc`).textContent = SET.class[name]?.accUnlock?.acc === 'power' ? magicPowers[id] @@ -1533,10 +1533,11 @@ function calcWeapon() { form["weapon"+i+"Class"].classList.toggle('error', errorAccClass[className] == true); // 必筋チェック const maxReqd - = (className === "フェンサー") ? reqdStrHalf + = SET.class[className]?.reqdHalf ? reqdStrHalf : /^\d+w$/i.test(weaponReqdRaw) ? reqdMnd : SET.class[className]?.accUnlock?.reqd ? stt['total'+SET.class[className]?.accUnlock?.reqd] : reqdStr; + console.log(maxReqd) form["weapon"+i+"Reqd"].classList.toggle('error', weaponReqd > maxReqd + (equipMod.WeaponReqd||0)); // 基礎命中 if(SET.class[className]?.accUnlock?.acc === 'power'){ @@ -1614,7 +1615,7 @@ function calcDefense() { } if(display == 'none'){ errorEvaClass[name] = true; } document.getElementById(`evasion-${eName}`).style.display = display; - document.getElementById(`evasion-${eName}-str`).textContent = id == 'Fen' ? reqdStrHalf : reqdStr; + document.getElementById(`evasion-${eName}-str`).textContent = SET.class[name]?.reqdHalf ? reqdStrHalf : reqdStr; document.getElementById(`evasion-${eName}-eva`).textContent = lv[id] + bonus.Agi; } document.getElementById("evasion-demonruler").style.display = !modeZero && lv['Dem'] >= 2 ? "" : modeZero && lv['Dem'] > 7 ? "" :"none"; @@ -1699,7 +1700,7 @@ function calcArmour(evaAdd,defBase) { form['evasionClass'+i].classList.toggle('error', errorEvaClass[className] == true); // 最大必筋 - const maxReqd = (className === "フェンサー") ? reqdStrHalf : reqdStr; + const maxReqd = (SET.class[className]?.reqdHalf) ? reqdStrHalf : reqdStr; // 計算 const classLv = lv[SET.class[className]?.id] || 0; diff --git a/_core/lib/sw2/edit-chara.pl b/_core/lib/sw2/edit-chara.pl index 8094af609..9d1e70d48 100644 --- a/_core/lib/sw2/edit-chara.pl +++ b/_core/lib/sw2/edit-chara.pl @@ -956,7 +956,7 @@ sub classInputBox { 0 0 ― - @{[ $name eq 'フェンサー' ? '-1' : '―' ]} + @{[ $data::class{$name}{critMod} || '―' ]} ― HTML } diff --git a/_core/lib/sw2/view-chara.pl b/_core/lib/sw2/view-chara.pl index 8a3cf2242..a50be2bb0 100644 --- a/_core/lib/sw2/view-chara.pl +++ b/_core/lib/sw2/view-chara.pl @@ -614,13 +614,13 @@ } next if !$isUnlock; } - my $reqdStr = ($id eq 'Fen' ? ceil($strTotal / 2) : $strTotal) + my $reqdStr = ($data::class{$name}{reqdHalf} ? ceil($strTotal / 2) : $strTotal) . ($pc{reqdStrWeaponMod} ? "+$pc{reqdStrWeaponMod}" : ''); push(@atacck, { NAME => $name."技能レベル".$pc{'lv'.$id}, STR => $reqdStr, ACC => $pc{'lv'.$id}+$pc{bonusDex}, - ($id eq 'Fen' ? (CRIT => '-1') : ('' => '')), + CRIT => ($data::class{$name}{critMod} || '―'), DMG => $id eq 'Dem' ? '―' : $pc{'lv'.$id}+$pc{bonusStr}, } ); } From a2f14790b37f6a40e50aee6198fe42fd5deb8a37 Mon Sep 17 00:00:00 2001 From: TALE <42292222+yutorize@users.noreply.github.com> Date: Tue, 8 Apr 2025 02:24:50 +0900 Subject: [PATCH 17/54] =?UTF-8?q?:bug:=20=E4=BF=AE=E6=AD=A3:=20[SW2]=20?= =?UTF-8?q?=E3=82=86=E3=81=A8=E3=83=81=E3=83=A3=E3=81=B8=E3=81=AE=E3=82=AD?= =?UTF-8?q?=E3=83=A3=E3=83=A9=E3=82=AF=E3=82=BF=E3=83=BC=E8=AA=AD=E3=81=BF?= =?UTF-8?q?=E8=BE=BC=E3=81=BF=E6=99=82=E3=81=AE=E3=83=86=E3=82=AD=E3=82=B9?= =?UTF-8?q?=E3=83=88(`sheetDescriptionM`)=E3=81=AB=EF=BC=A0=E8=A8=98?= =?UTF-8?q?=E6=B3=95=E3=81=A7=E3=81=AE=E8=83=BD=E5=8A=9B=E5=80=A4=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3=E3=81=8C=E5=8F=8D=E6=98=A0=E3=81=95=E3=82=8C=E3=81=A6?= =?UTF-8?q?=E3=81=84=E3=81=AA=E3=81=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _core/lib/sw2/json-sub.pl | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/_core/lib/sw2/json-sub.pl b/_core/lib/sw2/json-sub.pl index 0c70f9bd9..f2fd69fb8 100644 --- a/_core/lib/sw2/json-sub.pl +++ b/_core/lib/sw2/json-sub.pl @@ -77,12 +77,15 @@ sub addJsonData { my $base = "種族:$pc{race} 性別:$pc{gender} 年齢:$pc{age}"; my $sub = "ランク:".join('/', @ranks)." 信仰:".($pc{faith}||'-')." 穢れ:".($pc{sin}||0); my $classes = "技能:${class_text}"; - my $status = "能力値:器用$pc{sttDex}".($pc{sttAddA}?"+$pc{sttAddA}":'')."\[$pc{bonusDex}\]" - . "/敏捷$pc{sttAgi}".($pc{sttAddB}?"+$pc{sttAddB}":'')."\[$pc{bonusAgi}\]" - . "/筋力$pc{sttStr}".($pc{sttAddC}?"+$pc{sttAddC}":'')."\[$pc{bonusStr}\]" - . "/生命$pc{sttVit}".($pc{sttAddD}?"+$pc{sttAddD}":'')."\[$pc{bonusVit}\]" - . "/知力$pc{sttInt}".($pc{sttAddE}?"+$pc{sttAddE}":'')."\[$pc{bonusInt}\]" - . "/精神$pc{sttMnd}".($pc{sttAddF}?"+$pc{sttAddF}":'')."\[$pc{bonusMnd}\]"; + foreach ('A' .. 'F') { + $pc{"sttAddTotal${_}"} += $pc{"sttEquip${_}"}; + } + my $status = "能力値:器用$pc{sttDex}".($pc{sttAddTotalA}?"+$pc{sttAddTotalA}":'')."\[$pc{bonusDex}\]" + . "/敏捷$pc{sttAgi}".($pc{sttAddTotalB}?"+$pc{sttAddTotalB}":'')."\[$pc{bonusAgi}\]" + . "/筋力$pc{sttStr}".($pc{sttAddTotalC}?"+$pc{sttAddTotalC}":'')."\[$pc{bonusStr}\]" + . "/生命$pc{sttVit}".($pc{sttAddTotalD}?"+$pc{sttAddTotalD}":'')."\[$pc{bonusVit}\]" + . "/知力$pc{sttInt}".($pc{sttAddTotalE}?"+$pc{sttAddTotalE}":'')."\[$pc{bonusInt}\]" + . "/精神$pc{sttMnd}".($pc{sttAddTotalF}?"+$pc{sttAddTotalF}":'')."\[$pc{bonusMnd}\]"; $pc{sheetDescriptionS} = $base."\n".$classes; $pc{sheetDescriptionM} = $base."\n".$sub."\n".$classes."\n".$status; } From 0011994abc01e8a20c2856c12f55d2faa5f38742 Mon Sep 17 00:00:00 2001 From: TALE <42292222+yutorize@users.noreply.github.com> Date: Tue, 8 Apr 2025 02:21:45 +0900 Subject: [PATCH 18/54] =?UTF-8?q?:zap:=20=E6=94=B9=E5=96=84:=20[SW2]=20?= =?UTF-8?q?=E9=AD=94=E7=89=A9=E3=83=87=E3=83=BC=E3=82=BF=E3=81=AE=E3=83=A6?= =?UTF-8?q?=E3=83=8B=E3=83=83=E3=83=88=E5=87=BA=E5=8A=9B=E5=86=85=E5=AE=B9?= =?UTF-8?q?=E3=81=AE=E6=94=B9=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 「弱点」の項目を追加 - ココフォリアとゆとチャadv.ではメモ欄に防護点と弱点を表示するようにする --- _core/lib/edit.js | 1 + _core/lib/sw2/json-sub.pl | 22 ++++++++++++++++------ _core/lib/sw2/subroutine-sw2.pl | 23 ++++++++++++++++++++++- 3 files changed, 39 insertions(+), 7 deletions(-) diff --git a/_core/lib/edit.js b/_core/lib/edit.js index 1aeb0c7fb..da9c5c253 100644 --- a/_core/lib/edit.js +++ b/_core/lib/edit.js @@ -291,6 +291,7 @@ function setDefaultStatus(statusArray){ tbody.innerHTML = ''; for(let item of statusArray){ for (const key in item) { + if(key === 'メモ'){ continue } const row = document.createElement('tr'); row.innerHTML = ` diff --git a/_core/lib/sw2/json-sub.pl b/_core/lib/sw2/json-sub.pl index f2fd69fb8..2db334247 100644 --- a/_core/lib/sw2/json-sub.pl +++ b/_core/lib/sw2/json-sub.pl @@ -26,8 +26,8 @@ sub addJsonData { } } if (!$pc{mount} || $pc{"status${i}Vit"} =~ /\d/) { - $vitresist = $pc{mount} ? $pc{"status${i}Vit"} : $pc{vitResist} . '(' . $pc{vitResistFix} . ')'; - $mndresist = $pc{mount} ? $pc{"status${i}Mnd"} : $pc{mndResist} . '(' . $pc{mndResistFix} . ')'; + $vitresist = $pc{mount} ? $pc{"status${i}Vit"} : $pc{vitResist} . ' (' . $pc{vitResistFix} . ')'; + $mndresist = $pc{mount} ? $pc{"status${i}Mnd"} : $pc{mndResist} . ' (' . $pc{mndResistFix} . ')'; } } } @@ -39,15 +39,15 @@ sub addJsonData { $i .= $ii > 1 ? "-$ii" : ''; } } - $vitresist = $pc{mount} ? $pc{"status${i}Vit"} : $pc{vitResist} . '(' . $pc{vitResistFix} . ')'; - $mndresist = $pc{mount} ? $pc{"status${i}Mnd"} : $pc{mndResist} . '(' . $pc{mndResistFix} . ')'; + $vitresist = $pc{mount} ? $pc{"status${i}Vit"} : $pc{vitResist} . ' (' . $pc{vitResistFix} . ')'; + $mndresist = $pc{mount} ? $pc{"status${i}Mnd"} : $pc{mndResist} . ' (' . $pc{mndResistFix} . ')'; } my $taxa = "分類:$pc{taxa}"; my $data1 = "知能:$pc{intellect} 知覚:$pc{perception}".($pc{mount}?'':" 反応:$pc{disposition}"); $data1 .= " 穢れ:$pc{sin}" if $pc{sin}; my $data2 = "言語:$pc{language}".($pc{mount}?'':" 生息地:$pc{habitat}"); - my $data3 = "弱点:$pc{weakness}\n".($pc{mount}?'':"先制値:$pc{initiative} ")."生命抵抗力:${vitresist} 精神抵抗力:${mndresist}"; + my $data3 = ($pc{mount}?'':"先制値:$pc{initiative} ")."生命抵抗力:${vitresist} 精神抵抗力:${mndresist}"; $pc{sheetDescriptionS} = $taxa."\n".$data3; $pc{sheetDescriptionM} = $taxa." ".$data1."\n".$data2."\n".$data3; @@ -91,7 +91,17 @@ sub addJsonData { } ## ユニット(コマ)用ステータス -------------------------------------------------- - $pc{unitStatus} = createUnitStatus(\%pc, $target); + if ($pc{type} eq 'm' && $target eq 'ccfolia') { + $pc{unitStatus} = createUnitStatus(\%pc, $target); + #$pc{sheetDescriptionM} .= "\n".$pc{unitStatus}->{'メモ'} if $pc{unitStatus}->{'メモ'}; + my @memo = grep { exists $_->{'メモ'} } @{$pc{unitStatus}}; + $pc{sheetDescriptionM} .= "\n$memo[0]->{'メモ'}" if @memo && @memo[0]->{'メモ'}; + my @array = grep { !exists $_->{'メモ'} } @{$pc{unitStatus}}; + $pc{unitStatus} = \@array; + } + else { + $pc{unitStatus} = createUnitStatus(\%pc, $target); + } return \%pc; } diff --git a/_core/lib/sw2/subroutine-sw2.pl b/_core/lib/sw2/subroutine-sw2.pl index 04aefd863..aa7f8f04c 100644 --- a/_core/lib/sw2/subroutine-sw2.pl +++ b/_core/lib/sw2/subroutine-sw2.pl @@ -13,6 +13,7 @@ sub createUnitStatus { my %pc = %{$_[0]}; my $target = $_[1] || ''; my @unitStatus; + my @unitMemo; if ($pc{type} eq 'm'){ my @n2a = ('','A' .. 'Z'); if($pc{statusNum} > 1){ # 2部位以上 @@ -48,7 +49,7 @@ sub createUnitStatus { if ($target eq 'udonarium') { push(@unitStatus, {'防護' => join('/',@def)}); } else { - push(@unitStatus, {'メモ' => '防護:'.join('/',@def)}); + push(@unitMemo, '防護:'.join('/',@def)); } } else { # 1部位 @@ -66,6 +67,15 @@ sub createUnitStatus { push(@unitStatus, { 'MP' => "$mp/$mp" }) unless isEmptyValue($mp); push(@unitStatus, { '防護' => "$def" }); } + + if($pc{weakness} && $pc{weakness} ne 'なし'){ + if ($target eq 'udonarium') { + push(@unitStatus, { '弱点' => $pc{weakness} }); + } + else { + push(@unitMemo, '弱点:'.$pc{weakness}); + } + } } else { @unitStatus = ( @@ -88,6 +98,17 @@ sub createUnitStatus { push(@unitStatus, { '陣気' => '0' }) if $pc{lvWar}; } } + if(@unitMemo){ + if ($target eq 'udonarium') { + push(@unitStatus, {'メモ' => join(" ",@unitMemo)}); + } + if ($target eq 'ccfolia') { + push(@unitStatus, {'メモ' => join("\n",@unitMemo)}); + } + else { + push(@unitStatus, {'メモ' => join("
    ",@unitMemo)}); + } + } foreach my $key (split ',', $pc{unitStatusNotOutput}){ @unitStatus = grep { !exists $_->{$key} } @unitStatus; From 9f399ad9a769832868b2d8731e031b7a4b939db6 Mon Sep 17 00:00:00 2001 From: TALE <42292222+yutorize@users.noreply.github.com> Date: Wed, 28 May 2025 01:01:48 +0900 Subject: [PATCH 19/54] =?UTF-8?q?:bug:=20=E5=89=8A=E9=99=A4:=20[SW2.0]=20?= =?UTF-8?q?=E7=B7=A8=E9=9B=86=E7=94=BB=E9=9D=A2=E3=81=AB=E3=81=8A=E3=81=84?= =?UTF-8?q?=E3=81=A6=E3=80=81=E7=A7=98=E4=BC=9D=E6=AC=84=E3=81=AE=E6=89=80?= =?UTF-8?q?=E6=8C=81=E5=90=8D=E8=AA=89=E7=82=B9=E3=81=AE=E9=A0=85=E7=9B=AE?= =?UTF-8?q?=E3=81=8C2=E3=81=A4=E3=81=82=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _core/lib/sw2.0/edit-chara.pl | 1 - 1 file changed, 1 deletion(-) diff --git a/_core/lib/sw2.0/edit-chara.pl b/_core/lib/sw2.0/edit-chara.pl index 915fdbac3..597fce998 100644 --- a/_core/lib/sw2.0/edit-chara.pl +++ b/_core/lib/sw2.0/edit-chara.pl @@ -566,7 +566,6 @@ sub classInputBox { 秘伝 所持名誉点:

    -
    所持名誉点: