{"version":1,"kind":"hwanse-battle-formula-calculator-notes","status":"calculator-facing-evidence","sources":["out/battle_action_mapping.json","out/battle_mode_coefficient_review.json","out/battle_stat_flag_status_semantics_review.json","out/battle_player_actor_stat_layout_review.json","out/battle_result_family_dispatch_review.json","out/enemy_stat_table.json","Hwanse2.exe static disassembly"],"levelUp":{"routineVaHex":"0x0042177f","rngVaHex":"0x00427730","formula":"increase = row[minOffset] + rand(row[rangeOffset]); rand(n) returns 0..n-1 and rand(0)=0","playerRowsVaHex":"0x00457750 + characterIndex * 0xd8","statPairs":[{"stat":"체력","minOffset":"+0xcc","rangeOffset":"+0xcd"},{"stat":"기력","minOffset":"+0xce","rangeOffset":"+0xcf"},{"stat":"공격력","minOffset":"+0xd0","rangeOffset":"+0xd1"},{"stat":"방어력","minOffset":"+0xd2","rangeOffset":"+0xd3"},{"stat":"기술력","minOffset":"+0xd4","rangeOffset":"+0xd5"},{"stat":"순발력","minOffset":"+0xd6","rangeOffset":"+0xd7"}],"ranges":{"아타호":{"체력":"3..5","기력":"2..3","공격력":"3..4","방어력":"3..4","기술력":"2..4","순발력":"2..4"},"린샹":{"체력":"2..4","기력":"3..4","공격력":"2..3","방어력":"2..4","기술력":"3..4","순발력":"3..4"},"스마슈":{"체력":"3..5","기력":"2..3","공격력":"2..4","방어력":"2..4","기술력":"3..4","순발력":"2..4"}},"luck":"레벨업 때 운은 rand(100) + floor(level / 2) + 1로 재설정된다.","probabilityNote":"현재 확인된 EXE 루틴에는 능력치별 가중치 테이블이 없고, 각 능력치는 최소값 + rand(폭)으로 오른다. rand(n)은 CRT rand() 결과를 n으로 나눈 나머지라 폭 2는 균등, 폭 3은 32768개 원시값 기준 앞의 두 잔여값이 10923/32768, 마지막 잔여값이 10922/32768이 되는 미세한 modulo 편향만 있다. 스마슈 기술력은 EXE row가 3..4라 위키의 2..4와 다르며 2 상승은 이 루틴에서는 나오지 않는다.","probabilityByWidth":{"2":"min: 16384/32768, min+1: 16384/32768","3":"min: 10923/32768, min+1: 10923/32768, min+2: 10922/32768"},"disassemblyKeyLines":["4217d1: movzx ax, BYTE PTR [eax+0xcd]; 4217da: call 0x427730; 4217ea: mov dl, BYTE PTR [ecx+0xcc]","421835/421846: +0xcf/+0xce for MP","421891/4218a2: +0xd1/+0xd0 for attack","4218d9/4218ea: +0xd3/+0xd2 for defense","421921/421932: +0xd5/+0xd4 for technique","421969/42197a: +0xd7/+0xd6 for agility","4219a6: push 0x64; call 0x427730; 4219bc: level / 2; 4219c1: +1; 4219cd: write +0xc8 luck"]},"combatFormula":{"hitAvoidVaHex":"0x00434218","criticalGateVaHex":"0x004343db","statusGateVaHex":"0x004344ab","normalDamageVaHex":"0x0043461f","criticalDamageVaHex":"0x00434737","glancingDamage":"target bit 0x08 skips normal damage and writes rand(3)+1 to attacker +0x6e","miss":"target bit 0x20 skips result apply","critical":"attacker bit 0x10 selects alternate/critical damage and critical presentation; no MISS text is drawn for critical"},"enemyTableOffsetNote":"out/enemy_stat_table rows are exported in HP-view. Actor offset conversion for formula bytes is actorOffset = exportedOffset + 0x16. Therefore target family modifier byte actor +0x1c+family is exported byte family+0x06, and hit-class modifier actor +0x36+class is exported byte +0x20+class."}