Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion _core/lib/sw2.0/edit-chara.pl
Original file line number Diff line number Diff line change
Expand Up @@ -913,7 +913,12 @@ sub classInputBox {
<tr@{[ display $pc{'lv'.$id} ]} id="magic-power-${ename}">
<td>${name}
<td>$data::class{$name}{craft}{jName}
<td><label>@{[ input 'magicPowerOwn'.$id, 'checkbox','calcMagic' ]}$data::class{$name}{craft}{stt}+2</label>
<td>
HTML
if ($data::class{$name}{craft}{personalization} // 1) {
print "<label>@{[ input 'magicPowerOwn'.$id, 'checkbox','calcMagic' ]}$data::class{$name}{craft}{stt}+2</label>";
}
print <<"HTML";
<td>
HTML
if($data::class{$name}{craft}{power}){
Expand Down
4 changes: 2 additions & 2 deletions _core/lib/sw2/calc-chara.pl
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ sub data_calc {
+ int(($pc{sttInt}
+ $pc{sttAddE}
+ $pc{sttEquipE}
+ ($pc{'magicPowerOwn'.$id} ? 2 : 0)) / 6)
+ (($data::class{$name}{magic}{personalization} // 1) && $pc{'magicPowerOwn'.$id} ? 2 : 0)) / 6)
+ $pc{'magicPowerAdd'.$id}
+ $pc{magicPowerAdd}
+ $pc{magicPowerEnhance}
Expand All @@ -553,7 +553,7 @@ sub data_calc {
next if (!$data::class{$name}{craft}{stt});
my $id = $data::class{$name}{id};
my $st = $data::class{$name}{craft}{stt};
$pc{'magicPower'.$id} = $pc{'lv'.$id} ? ( $pc{'lv'.$id} + int(($pc{'stt'.$stt{$st}[0]} + $pc{'sttAdd'.$stt{$st}[1]} + $pc{'sttEquip'.$stt{$st}[1]} + ($pc{'magicPowerOwn'.$id} ? 2 : 0)) / 6) + $pc{'magicPowerAdd'.$id} ) : 0;
$pc{'magicPower'.$id} = $pc{'lv'.$id} ? ( $pc{'lv'.$id} + int(($pc{'stt'.$stt{$st}[0]} + $pc{'sttAdd'.$stt{$st}[1]} + $pc{'sttEquip'.$stt{$st}[1]} + (($data::class{$name}{craft}{personalization} // 1) && $pc{'magicPowerOwn'.$id} ? 2 : 0)) / 6) + $pc{'magicPowerAdd'.$id} ) : 0;
}
$pc{magicPowerAlc} += $pc{alchemyEnhance};

Expand Down
1 change: 1 addition & 0 deletions _core/lib/sw2/data-class.pl
Original file line number Diff line number Diff line change
Expand Up @@ -612,6 +612,7 @@ package data;
jName => '操気',
eName => 'psychokinesis',
stt => '精神力',
personalization => 0,
power => '理力',
data => [
[1,'気集中','[補]'],
Expand Down
6 changes: 3 additions & 3 deletions _core/lib/sw2/edit-chara.js
Original file line number Diff line number Diff line change
Expand Up @@ -1237,7 +1237,7 @@ function calcMagic() {
if(cLv){ openMagic++; }

const seekerMagicAdd = (lvSeeker && checkSeekerAbility('魔力上昇') && cLv >= 15) ? 3 : 0;
let power = cLv + parseInt((stt.totalInt + (form["magicPowerOwn"+id].checked ? 2 : 0)) / 6) + Number(form["magicPowerAdd"+id].value) + addPower + seekerMagicAdd + raceAbilityMagicPower;
let power = cLv + parseInt((stt.totalInt + ((form["magicPowerOwn"+id]?.checked ?? false) ? 2 : 0)) / 6) + Number(form["magicPowerAdd"+id].value) + addPower + seekerMagicAdd + raceAbilityMagicPower;
if(id === 'Pri' && (
raceAbilities.includes('神の御名と共に')
|| raceAbilities.includes('神への礼賛')
Expand All @@ -1257,10 +1257,10 @@ function calcMagic() {

let power = cLv;
if (SET.class[key].craft.stt === '知力') {
power += parseInt((stt.totalInt + (form["magicPowerOwn"+id].checked ? 2 : 0)) / 6);
power += parseInt((stt.totalInt + ((form["magicPowerOwn"+id]?.checked ?? false) ? 2 : 0)) / 6);
}
else if(SET.class[key].craft.stt === '精神力'){
power += parseInt((stt.totalMnd + (form["magicPowerOwn"+id].checked ? 2 : 0)) / 6);
power += parseInt((stt.totalMnd + ((form["magicPowerOwn"+id]?.checked ?? false) ? 2 : 0)) / 6);
}
if(SET.class[key].craft.power){
power += Number(form["magicPowerAdd"+id].value);
Expand Down
7 changes: 6 additions & 1 deletion _core/lib/sw2/edit-chara.pl
Original file line number Diff line number Diff line change
Expand Up @@ -913,7 +913,12 @@ sub classInputBox {
<tr@{[ display $pc{'lv'.$id} ]} id="magic-power-${ename}">
<td>${name}
<td>$data::class{$name}{craft}{jName}
<td><label>@{[ input 'magicPowerOwn'.$id, 'checkbox','calcMagic' ]}$data::class{$name}{craft}{stt}+2</label>
<td>
HTML
if ($data::class{$name}{craft}{personalization} // 1) {
print "<label>@{[ input 'magicPowerOwn'.$id, 'checkbox', 'calcMagic' ]}$data::class{$name}{craft}{stt}+2</label>";
}
print <<"HTML";
<td>
HTML
if($data::class{$name}{craft}{power}){
Expand Down