<?xml version='1.0' encoding='utf-8'?>
<CheatTable CheatEngineTableVersion="45">
  <CheatEntries>
    <CheatEntry>
      <ID>0</ID>
      <Description>"Auto-Attach and Version Check"</Description>
      <GroupHeader>1</GroupHeader>
    </CheatEntry>
    <CheatEntry>
      <ID>1</ID>
      <Description>"☕ Fuel the Cheats - Tip Katzy (Toggle to open my Ko-fi page)"</Description>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>[ENABLE]
{$lua}
if syntaxcheck then return end
if not BO_Katzy then error('Allow this table’s Lua script to run, then reopen the table.',0) end
{$asm}
[DISABLE]
</AssemblerScript>
    </CheatEntry>
    <CheatEntry>
      <ID>2</ID>
      <Description>"How to use - Katzy"</Description>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>[ENABLE]
{$lua}
if syntaxcheck then return end
if not BO_Katzy then error('Allow this table’s Lua script to run, then reopen the table.',0) end
{$asm}
[DISABLE]
</AssemblerScript>
    </CheatEntry>
    <CheatEntry>
      <ID>3</ID>
      <Description>"Clear All"</Description>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>[ENABLE]
{$lua}
if syntaxcheck then return end
if not BO_Katzy then error('Allow this table’s Lua script to run, then reopen the table.',0) end
{$asm}
[DISABLE]
</AssemblerScript>
    </CheatEntry>
    <CheatEntry>
      <ID>4</ID>
      <Description>"[MAIN] Brutal Orchestra"</Description>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>[ENABLE]
{$lua}
if syntaxcheck then return end
if not BO_Katzy then error('Allow this table’s Lua script to run, then reopen the table.',0) end
{$asm}
[DISABLE]
</AssemblerScript>
      <Options moHideChildren="1" />
      <CheatEntries>
        <CheatEntry>
          <ID>8</ID>
          <Description>"Ignore Pigment Color"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
{$lua}
if syntaxcheck then return end
if not BO_Katzy then error('Allow this table’s Lua script to run, then reopen the table.',0) end
{$asm}
[DISABLE]
</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>7</ID>
          <Description>"Infinite Actions"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
{$lua}
if syntaxcheck then return end
if not BO_Katzy then error('Allow this table’s Lua script to run, then reopen the table.',0) end
{$asm}
[DISABLE]
</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>6</ID>
          <Description>"Infinite Currency"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
{$lua}
if syntaxcheck then return end
if not BO_Katzy then error('Allow this table’s Lua script to run, then reopen the table.',0) end
{$asm}
[DISABLE]
</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>5</ID>
          <Description>"Infinite HP"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
{$lua}
if syntaxcheck then return end
if not BO_Katzy then error('Allow this table’s Lua script to run, then reopen the table.',0) end
{$asm}
[DISABLE]
</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>9</ID>
          <Description>"Infinite Movement"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
{$lua}
if syntaxcheck then return end
if not BO_Katzy then error('Allow this table’s Lua script to run, then reopen the table.',0) end
{$asm}
[DISABLE]
</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>10</ID>
          <Description>"Opponents to 1 HP"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
{$lua}
if syntaxcheck then return end
if not BO_Katzy then error('Allow this table’s Lua script to run, then reopen the table.',0) end
{$asm}
[DISABLE]
</AssemblerScript>
        </CheatEntry>
      </CheatEntries>
    </CheatEntry>
  </CheatEntries>
  <UserdefinedSymbols />
  <Comments>How to use - Katzy
Table identification: Katzy.
Brutal Orchestra 1.4.3 | Table v1.7

1. Open the table in Cheat Engine and allow its Lua script to run.
2. Start Brutal Orchestra. Auto-Attach and Version Check connects to the supported game automatically.
3. Tick [MAIN] Brutal Orchestra, then the options you want. Options can be enabled or disabled at the main menu and apply when a run starts.

Ignore Pigment Color: fill every ability cost slot with any available pigment. All selected pigments are still consumed, but wrong colors cause no mismatch damage. The required number of pigments, automatic pigment selection, overflow damage, and other damage remain unchanged. Empty slots still prevent performing the ability. Reselect the ability or change a filled slot to refresh an already-open damage preview after toggling.

Infinite Actions: using an ability no longer spends the character's action, allowing repeated attacks during your player turn. Pigment costs, action counters, attack effects, enemy turns, movement limits, and other status restrictions remain normal. Enable before attacking; a character whose action was already spent becomes available on the next normal action refresh or player turn. Disabling makes the next ability spend its action normally; it does not undo attacks already performed.

Infinite Currency: adds a reusable 900-coin purchasing allowance above your current earned balance. It covers shops, character recruitment, rank-ups, and dialogue currency checks. Gains increase the total normally. Spending uses earned coins first, stopping at the 900-coin allowance; disabling removes only the allowance and retains unspent earnings. Example: 900 + 25 earned = 925; spend 10 to show 915; spend another 30 to show 900; disable to retain 0 earned coins.

Currency displays refresh on their next normal update; reopen the party/shop menu or wait for the next currency change. The allowance is not written into saves and does not increase currency-based combat bonuses or unlock thresholds. Combat rewards, losses, and transfers keep their normal stored amounts.

Infinite HP: refills living party members on the combat field to their own maximum HP when enabled, then tops them up about every half-second while active. It also prevents normal damage, damage-over-time routed through normal damage, and pigment damage such as overflow or ability costs. New or swapped-in party members are included. Enemy HP remains unchanged.

Enable it at the main menu to refill the party when combat starts. Outside combat, the refill waits until the next combat. Dead characters are not revived. Scripted instant death is not blocked. Maximum-HP changes remain natural, and subsequent top-ups use the new maximum. Effects that require actual HP loss may not trigger while protected.

Infinite Movement: moving or swapping no longer spends the character's movement, allowing repeated manual moves during your player turn. Enable before moving; a character whose movement was already spent becomes available on the next normal movement refresh or player turn. Enemy turns, movement effects, and other status restrictions stay normal. Disabling makes the next move spend movement normally and leaves everyone in their current position. This option is independent of Infinite Actions.

Opponents to 1 HP: sets living opponents currently on the combat field to 1 HP once when enabled. New opponents start at 1 HP while the option is on. Health is not locked: damage and healing work normally afterward. Maximum health and party HP are unchanged; dead opponents are not revived. Enable at the main menu to apply when combat starts. Disabling restores normal starting HP for future opponents and leaves existing opponents at their current health. Toggling on again repeats the one-time reduction.

Untick an option to restore its original behavior. Unticking MAIN or using Clear All disables all options. Current HP is retained; prevented damage is not applied later. Closing Cheat Engine makes one silent cleanup attempt and preserves the close action even if cleanup fails. Table replacement also restores the code during orderly cleanup.

☕ Fuel the Cheats - Tip Katzy (Toggle to open my Ko-fi page): opens https://ko-fi.com/katzy only when selected, then stays unticked.
How to use - Katzy: shows these instructions and stays unticked.
Clear All: turns off all cheats and MAIN and stays unticked.
</Comments>
  <LuaScript>--[[
Table identification: Katzy
Brutal Orchestra 1.4.3 | Steam build 24657393 | Table v1.7
Targets independently derived from the installed assembly and its Mono JIT code.
Currency is a virtual 900-coin purchasing allowance; stored earnings are untouched.
Installed assets: 198 wearable records parsed; ordinary shop maximum is 10.
Shop costs use shopPrice directly; recruitment/rank prices remain two-digit.
]]
local previous=BO_Katzy
if previous then
  local ok = BO_Katzy.shutdown()
  if not ok then error('The previous table could not restore its changes. Reattach to the same game and use Clear All.', 0) end
end
BO_Katzy = {patches={},currencyPatches={},actionPatches={},pigmentPatches={},movementPatches={},enemyPatches={},enemyCave=previous and previous.enemyCave,currencyCave=previous and previous.currencyCave,hpCave=previous and previous.hpCave,ready=false,closing=false}
local B = BO_Katzy
local list = getAddressList()
local function row(id) return list.getMemoryRecordByID(id) end
local function fail(message) error({message=message}, 0) end
local function message(err)
  if type(err)=='table' and err.message then return err.message end
  B.diagnostic=tostring(err)
  return 'Cheat Engine could not complete the operation. Check that the game is still running and attached, then try again.'
end
local function status(text) B.status=text; row(0).Description='Auto-Attach and Version Check - '..text end
local function same(a,b)
  if not a or #a~=#b then return false end
  for i=1,#b do if a[i]~=b[i] then return false end end
  return true
end
local function hex(s)
  local out={} for pair in s:gmatch('%x%x') do out[#out+1]=tonumber(pair,16) end return out
end
local function read(address,count)
  local data=readBytes(address,count,true)
  if not data or #data~=count then fail('The game code is no longer readable. Check that the same game is still attached.') end
  return data
end
local function put(address,data)
  writeBytes(address,data)
  if not same(read(address,#data),data) then fail('Cheat Engine could not verify the memory change. The table will try to undo it.') end
end
local function module(pid)
  for _,m in ipairs(enumModules(pid) or {}) do
    if m.Name:lower()=='brutalorchestra.exe' then return m end
  end
end
local function identity()
  if not B.pid or getOpenedProcessID()~=B.pid then return false end
  local m=module(B.pid)
  if not m or m.Address~=B.base or m.PathToFile~=B.path then return false end
  local age=getProcessAge()
  if B.age and age&lt;B.age then return false end
  B.age=age
  return true
end
local function transaction(fn)
  if not identity() then fail('The attached process changed. Reattach to the original Brutal Orchestra process before clearing its cheats.') end
  local alreadyPaused=isPaused()
  if not alreadyPaused then pause() end
  local ok,err=pcall(fn)
  if not alreadyPaused then unpause() end
  if not ok then error(err,0) end
end
local function restore(patches)
  if #patches==0 then return true end
  if not (getProcesslist() or {})[B.pid] then for i=#patches,1,-1 do table.remove(patches,i) end; return true end
  local errors={}
  transaction(function()
    for i=#patches,1,-1 do
      local p=patches[i]
      local ok,err=pcall(function()
        local current=read(p.address,#p.old)
        if same(current,p.new) then put(p.address,p.old)
        elseif not same(current,p.old) then
          fail('Another tool changed the patched code. Its changes were left untouched; disable the other modification, then use Clear All again.')
        end
      end)
      if ok then table.remove(patches,i) else errors[#errors+1]=message(err) end
    end
  end)
  if #errors&gt;0 then fail(table.concat(errors,'\n')) end
  return true
end
function B.disable()
  B.hpEnabled=false
  if B.timer then B.timer.Interval=2000 end
  if #B.patches&gt;0 and identity() and B.hpCave then put(B.hpCave.flag,{0,0,0,0}) end
  return restore(B.patches)
end
function B.disableCurrency()
  if #B.currencyPatches==0 then return true end
  if identity() and B.currencyCave then put(B.currencyCave.flag,{0,0,0,0}) end
  return restore(B.currencyPatches)
end
function B.disableEnemy()
  if #B.enemyPatches==0 then return true end
  if identity() and B.enemyCave then put(B.enemyCave.flag,{0,0,0,0}) end
  return restore(B.enemyPatches)
end
function B.disableMovement() return restore(B.movementPatches) end
function B.disableActions() return restore(B.actionPatches) end
function B.disablePigment() return restore(B.pigmentPatches) end
function B.disableAll()
  local errors={}
  for _,fn in ipairs({B.disableEnemy,B.disableMovement,B.disableActions,B.disablePigment,B.disableCurrency,B.disable}) do
    local ok,err=pcall(fn)
    if not ok then errors[#errors+1]=message(err) end
  end
  if #errors&gt;0 then fail(table.concat(errors,'\n')) end
  return true
end
function B.clear()
  B.disableAll()
  row(10).Active=false
  row(9).Active=false
  row(8).Active=false
  row(7).Active=false
  row(6).Active=false
  row(5).Active=false
  row(4).Active=false
  return true
end
function B.attach()
  if B.pid and not (getProcesslist() or {})[B.pid] then
    B.patches={}; B.currencyPatches={}; B.actionPatches={}; B.pigmentPatches={}; B.movementPatches={}; B.enemyPatches={}; B.enemyCave=nil; B.currencyCave=nil; B.hpCave=nil; B.hpEnabled=false; B.timer.Interval=2000; B.ready=false; B.pid=nil; B.mono=false; B.age=nil
    row(10).Active=false; row(9).Active=false; row(8).Active=false; row(7).Active=false; row(6).Active=false; row(5).Active=false; row(4).Active=false
  end
  if B.ready and identity() then return true end
  B.ready=false
  if #B.patches&gt;0 or #B.currencyPatches&gt;0 or #B.actionPatches&gt;0 or #B.pigmentPatches&gt;0 or #B.movementPatches&gt;0 or #B.enemyPatches&gt;0 then fail('Reattach to the original Brutal Orchestra process and use Clear All before changing processes.') end
  local matches={}
  for pid,name in pairs(getProcesslist() or {}) do
    if name:lower()=='brutalorchestra.exe' then matches[#matches+1]=pid end
  end
  if #matches==0 then status('waiting for the game'); return false end
  if #matches~=1 then fail('More than one Brutal Orchestra process is running. Close the extra game instance.') end
  local pid=matches[1]
  local m=module(pid)
  if not m or not m.Is64Bit then fail('The running game is not the supported 64-bit Brutal Orchestra executable.') end
  local dir=m.PathToFile:match('^(.*)[/\\]')
  if not dir then fail('Cheat Engine could not identify the game folder.') end
  if md5file(m.PathToFile):lower()~='d43984b172610296ed5417e3c3510eaf' or
     md5file(dir..'\\BrutalOrchestra_Data\\Managed\\Assembly-CSharp.dll'):lower()~='ef2518bf64a8e51a6d7822b286491c38' then
    fail('This table supports Brutal Orchestra 1.4.3, Steam build 24657393. The installed game files differ; an updated table is needed.')
  end
  local _,version=getFileVersion(m.PathToFile)
  if not version or version.major~=2020 or version.minor~=3 or version.release~=49 then
    fail('The game executable version does not match this table.')
  end
  if getOpenedProcessID()~=pid then openProcess(pid) end
  if getOpenedProcessID()~=pid then fail('Cheat Engine could not attach to Brutal Orchestra. Check access to the running game.') end
  B.pid=pid; B.base=m.Address; B.path=m.PathToFile; B.age=getProcessAge(); B.mono=false; B.ready=true
  status('1.4.3 verified')
  return true
end
local function append(a,b) for _,v in ipairs(b) do a[#a+1]=v end return a end
local function packed(fmt,value) return {string.pack(fmt,value):byte(1,string.packsize(fmt))} end
local function currencyMethod(class,name)
  local id
  if class=='RunInGameData/&lt;&gt;c__DisplayClass8_0' then
    local parent=mono_findClass('','RunInGameData')
    if not parent or parent==0 then fail('The dialogue currency class is missing.') end
    for _,child in ipairs(mono_class_getNestedTypes(parent) or {}) do
      if mono_class_getName(child)=='&lt;&gt;c__DisplayClass8_0' then id=mono_class_findMethod(child,name); break end
    end
  else id=mono_findMethod('',class,name) end
  if not id or id==0 then fail('A required game routine is missing. This game build or mod setup needs an updated table.') end
  local address=mono_compile_method(id)
  if not address or address==0 then fail('A required game routine could not be prepared. Wait until the main menu is loaded and try again.') end
  local info=mono_getJitInfo(address)
  if not info or info.method~=id or info.code_start~=address or info.code_size&lt;16 or info.code_size&gt;16384 then
    fail('A required game routine could not be identified reliably. No new cheats were applied.')
  end
  return address,read(address,info.code_size)
end
local function enableAbilityPatch(ledger,class,name,pattern,offset,old,new)
  if not row(4).Active then fail('Enable [MAIN] Brutal Orchestra first.') end
  B.main()
  if #ledger&gt;0 then fail('Use Clear All to finish restoring the previous ability changes before enabling again.') end
  local address,code=currencyMethod(class,name)
  local found
  for i=1,#code-#pattern+1 do
    local matches=true
    for j=1,#pattern do if code[i+j-1]~=pattern[j] then matches=false; break end end
    if matches then
      if found then fail('The ability code is ambiguous. No new cheats were applied.') end
      found=address+i-1
    end
  end
  if not found then fail('The ability code differs from the supported build or is already modified. No new cheats were applied.') end
  local patch={address=found+offset,old=old,new=new}
  transaction(function()
    if not same(read(patch.address,#old),old) then fail('Another modification changed the ability code. No new cheats were applied.') end
    ledger[#ledger+1]=patch
    local ok,err=pcall(put,patch.address,new)
    if not ok then
      -- A failed write can be partial; the paused process still owns this write.
      if pcall(put,patch.address,old) then table.remove(ledger) end
      error(err,0)
    end
  end)
  return true
end
function B.enableActions()
  -- Keep the normal action counter and UI update; only retain ability availability.
  return enableAbilityPatch(B.actionPatches,'CharacterCombat','UseAbility',
    hex('41 C6 87 AA 00 00 00 00 41 C6 87 CC 00 00 00 01 49 63 87 B0 00 00 00 FF C0 41 89 87 B0 00 00 00'),7,{0},{1})
end
function B.enableMovement()
  -- Preserve the slot change, movement notifications, and manual-swap tracking.
  return enableAbilityPatch(B.movementPatches,'CharacterCombat','SwapTo',
    hex('89 87 D4 00 00 00 C6 87 A8 00 00 00 00 C6 87 CB 00 00 00 01 48 8B CF 33 D2'),12,{0},{1})
end
function B.enablePigment()
  -- The null/destroyed pigment branch stays intact. Only real pigment colors match.
  return enableAbilityPatch(B.pigmentPatches,'ManaColorSO','DealsCostDamage',
    hex('0F B6 47 69 85 C0 74 2A 0F B6 46 69 85 C0 74 22 48 8B 56 20 48 8B CF'),0,
    hex('0F B6 47 69'),hex('31 C0 90 90'))
end
local function refillPatch()
  for class,fields in pairs({CombatManager={_stats=0x80,_combatInitialized=0xB0},CombatStats={_activeCharacterIDsOnField=0x30},CharacterCombat={_maximumHealth=0x98,_currentHealth=0xA0}}) do
    local id=mono_findClass('',class)
    if not id or id==0 then fail('The party refill classes could not be found.') end
    local found={}
    for _,field in ipairs(mono_class_enumFields(id,false) or {}) do found[field.name]=field.offset end
    for name,offset in pairs(fields) do if found[name]~=offset then fail('The party refill layout differs from the supported build.') end end
  end
  local update,code=currencyMethod('CombatManager','Update')
  local old=hex('55 48 8B EC 48 83 EC 40 48 89 75 F8 48 8B F1')
  local first={} for i=1,#old do first[i]=code[i] end
  if not same(first,old) then fail('The combat update routine is already modified or differs from this build.') end
  local getCharacter=currencyMethod('CombatStats','TryGetCharacterOnField')
  local changeHealth=currencyMethod('CharacterCombat','ChangeHealthTo')
  local cave=B.hpCave
  if cave and (cave.pid~=B.pid or cave.base~=B.base or cave.path~=B.path or getProcessAge()&lt;cave.age) then cave=nil end
  if not cave then
    local address=allocateMemory(4096)
    if not address or address==0 then fail('Cheat Engine could not reserve memory for party healing.') end
    cave={address=address,flag=address+0xF00,pending=address+0xF04,pid=B.pid,base=B.base,path=B.path,age=getProcessAge()}
    B.hpCave=cave
  end
  local body,labels,branches={},{},{}
  local function emit(s) append(body,hex(s)) end
  local function label(s) labels[s]=#body end
  local function branch(op,s) emit(op); branches[#branches+1]={at=#body,label=s}; append(body,{0,0,0,0}) end
  local function compareFlag()
    local start=cave.address+#body
    emit('83 3D'); append(body,packed('&lt;i4',cave.flag-(start+7))); emit('00')
  end
  local function call(address) emit('49 BB'); append(body,packed('&lt;I8',address)); emit('41 FF D3') end
  -- Preserve the original Update input state and Windows x64 call alignment.
  emit('9C 50 51 52 41 50 41 51 41 52 41 53 53 56 57 41 54 41 55 48 83 EC 20')
  compareFlag(); branch('0F84','done')
  emit('48 B8'); append(body,packed('&lt;I8',cave.pending)); emit('31 D2 87 10 85 D2'); branch('0F84','done')
  emit('48 8B D9 80 BB B0 00 00 00 00'); branch('0F84','done')
  emit('48 8B B3 80 00 00 00 48 85 F6'); branch('0F84','done')
  emit('48 8B 7E 30 48 85 FF'); branch('0F84','done')
  emit('44 8B 6F 18 41 83 FD 05'); branch('0F87','done')
  emit('45 31 E4')
  label('loop'); emit('45 3B E5'); branch('0F83','done')
  compareFlag(); branch('0F84','done')
  emit('42 8B 54 A7 20 85 D2'); branch('0F88','next')
  emit('48 8B CE'); call(getCharacter)
  emit('48 85 C0'); branch('0F84','next')
  emit('8B 90 A0 00 00 00 85 D2'); branch('0F8E','next')
  emit('8B 88 98 00 00 00 3B CA'); branch('0F8E','next')
  emit('8B D1 48 8B C8'); call(changeHealth)
  label('next'); emit('41 FF C4'); branch('E9','loop')
  label('done')
  emit('48 83 C4 20 41 5D 41 5C 5F 5E 5B 41 5B 41 5A 41 59 41 58 5A 59 58 9D')
  append(body,old); emit('FF 25 00 00 00 00'); append(body,packed('&lt;I8',update+#old))
  for _,fix in ipairs(branches) do
    local bytes=packed('&lt;i4',labels[fix.label]-(fix.at+4))
    for i=1,4 do body[fix.at+i]=bytes[i] end
  end
  if cave.code and not same(read(cave.address,#cave.code),cave.code) then fail('The reserved party refill code was changed by another tool.') end
  put(cave.flag,{0,0,0,0}); put(cave.pending,{1,0,0,0}); put(cave.address,body); cave.code=body
  local jump=append(hex('FF 25 00 00 00 00'),packed('&lt;I8',cave.address)); jump[#jump+1]=0x90
  -- The single retained page is reused. In-flight Update calls can finish safely
  -- after unhooking; no stale character pointer or health snapshot is retained.
  return {address=update,old=old,new=jump}
end
function B.enableEnemy()
  if not row(4).Active then fail('Enable [MAIN] Brutal Orchestra first.') end
  B.main()
  if #B.enemyPatches&gt;0 then fail('Use Clear All to finish restoring the previous opponent changes first.') end
  for class,fields in pairs({CombatManager={_stats=0x80,_combatInitialized=0xB0},CombatStats={_activeEnemyIDsOnField=0x38},EnemyCombat={_maximumHealth=0x90,_currentHealth=0x98}}) do
    local id=mono_findClass('',class)
    if not id or id==0 then fail('The opponent health classes could not be found.') end
    local found={}
    for _,field in ipairs(mono_class_enumFields(id,false) or {}) do found[field.name]=field.offset end
    for name,offset in pairs(fields) do if found[name]~=offset then fail('The opponent health layout differs from the supported build.') end end
  end
  local update,code=currencyMethod('CombatManager','Update')
  -- This site follows the party-healing hook and shares no overwritten bytes.
  local old=hex('48 8B 46 78 48 8B C8 83 38 00 48 8D 64 24 00')
  local actual={} for i=1,#old do actual[i]=code[0x0F+i] end
  if not same(actual,old) then fail('The opponent update site differs from this build or is already modified.') end
  local constructor,ctorCode=currencyMethod('EnemyCombat','.ctor')
  local pattern=hex('49 63 84 24 90 00 00 00 41 89 84 24 98 00 00 00 49 8B 44 24 68')
  local found
  for i=1,#ctorCode-#pattern+1 do
    local matches=true
    for j=1,#pattern do if ctorCode[i+j-1]~=pattern[j] then matches=false; break end end
    if matches then
      if found then fail('The opponent starting-health code is ambiguous.') end
      found=constructor+i-1
    end
  end
  if not found then fail('The opponent starting-health code differs from this build or is already modified.') end
  local getEnemy=currencyMethod('CombatStats','TryGetEnemyOnField')
  local changeHealth=currencyMethod('EnemyCombat','ChangeHealthTo')
  local cave=B.enemyCave
  if cave and (cave.pid~=B.pid or cave.base~=B.base or cave.path~=B.path or getProcessAge()&lt;cave.age) then cave=nil end
  if not cave then
    local address=allocateMemory(4096)
    if not address or address==0 then fail('Cheat Engine could not reserve memory for opponent health.') end
    cave={address=address,flag=address+0xF00,pending=address+0xF04,pid=B.pid,base=B.base,path=B.path,age=getProcessAge()}
    B.enemyCave=cave
  end
  local body,labels,branches={},{},{}
  local function emit(s) append(body,hex(s)) end
  local function label(s) labels[s]=#body end
  local function branch(op,s) emit(op); branches[#branches+1]={at=#body,label=s}; append(body,{0,0,0,0}) end
  local function compare(address)
    local start=cave.address+#body
    emit('83 3D'); append(body,packed('&lt;i4',address-(start+7))); emit('00')
  end
  local function call(address) emit('49 BB'); append(body,packed('&lt;I8',address)); emit('41 FF D3') end
  -- Update has already established its frame here. Save state and align calls.
  emit('9C 50 51 52 41 50 41 51 41 52 41 53 53 56 57 41 54 41 55 48 83 EC 28')
  compare(cave.flag); branch('0F84','done')
  compare(cave.pending); branch('0F84','done')
  emit('48 8B DE 80 BB B0 00 00 00 00'); branch('0F84','done')
  emit('48 8B B3 80 00 00 00 48 85 F6'); branch('0F84','done')
  emit('48 8B 7E 38 48 85 FF'); branch('0F84','done')
  emit('44 8B 6F 18 41 83 FD 05'); branch('0F87','done')
  -- Consume only after combat is initialized. Never re-arm from the timer.
  emit('48 B8'); append(body,packed('&lt;I8',cave.pending)); emit('31 D2 87 10 85 D2'); branch('0F84','done')
  emit('45 31 E4')
  label('loop'); emit('45 3B E5'); branch('0F83','done')
  compare(cave.flag); branch('0F84','done')
  emit('42 8B 54 A7 20 85 D2'); branch('0F88','next')
  emit('48 8B CE'); call(getEnemy)
  emit('48 85 C0'); branch('0F84','next')
  emit('83 B8 98 00 00 00 01'); branch('0F8E','next')
  emit('83 B8 90 00 00 00 01'); branch('0F8C','next')
  emit('48 8B C8 BA 01 00 00 00'); call(changeHealth)
  label('next'); emit('41 FF C4'); branch('E9','loop')
  label('done')
  emit('48 83 C4 28 41 5D 41 5C 5F 5E 5B 41 5B 41 5A 41 59 41 58 5A 59 58 9D')
  append(body,old); emit('FF 25 00 00 00 00'); append(body,packed('&lt;I8',update+0x0F+#old))
  for _,fix in ipairs(branches) do
    local bytes=packed('&lt;i4',labels[fix.label]-(fix.at+4))
    for i=1,4 do body[fix.at+i]=bytes[i] end
  end
  if cave.code and not same(read(cave.address,#cave.code),cave.code) then fail('The reserved opponent health code was changed by another tool.') end
  put(cave.flag,{0,0,0,0}); put(cave.pending,{1,0,0,0}); put(cave.address,body); cave.code=body
  local jump=append(hex('FF 25 00 00 00 00'),packed('&lt;I8',cave.address)); jump[#jump+1]=0x90
  local patches={
    {address=found,old=hex('49 63 84 24 90 00 00 00'),new=hex('B8 01 00 00 00 90 90 90')},
    {address=update+0x0F,old=old,new=jump}
  }
  transaction(function()
    for _,p in ipairs(patches) do if not same(read(p.address,#p.old),p.old) then fail('Another modification changed the opponent code. No new cheats were applied.') end end
    local ok,err=pcall(function()
      for _,p in ipairs(patches) do B.enemyPatches[#B.enemyPatches+1]=p; put(p.address,p.new) end
      put(cave.flag,{1,0,0,0})
    end)
    if not ok then
      pcall(put,cave.flag,{0,0,0,0})
      for i=#B.enemyPatches,1,-1 do
        local p=B.enemyPatches[i]
        if pcall(put,p.address,p.old) then table.remove(B.enemyPatches,i) end
      end
      error(err,0)
    end
  end)
  -- Retain the reusable page so any in-flight Update call can return safely.
  return true
end
function B.enableCurrency()
  if not row(4).Active then fail('Enable [MAIN] Brutal Orchestra first.') end
  B.main()
  if #B.currencyPatches&gt;0 then fail('Use Clear All to finish restoring the previous currency changes first.') end
  local sites={}
  local descriptor
  for _,spec in ipairs({
    {'ShopMenuUIHandler','SetInformation',2,0xA0},
    {'FoolsMenuUIHandler','SetInformation',2,0xA0},
    {'PartyMenuUIHandler','SetInformation',1,0xA0},
    {'RankUpMenuUIHandler','SetInformation',1,0xA0},
    {'RankUpMenuUIHandler','SetCharacterInformation',1,0xA0},
    {'RunInGameData/&lt;&gt;c__DisplayClass8_0','&lt;InitializeDialogueFunctions&gt;b__10',1,0xE0}
  }) do
    local address,code=currencyMethod(spec[1],spec[2])
    local found=0
    for i=1,#code-12 do
      if code[i]==0x49 and code[i+1]==0xBA and code[i+10]==0xFF and code[i+11]==0x50 and code[i+12]==spec[4] then
        local current={} for j=2,9 do current[#current+1]=code[i+j] end
        if spec[4]==0xA0 then
          if descriptor and not same(descriptor,current) then fail('The shop currency interface differs from the supported build.') end
          descriptor=current
        end
        sites[#sites+1]=address+i+12; found=found+1
      end
    end
    if found~=spec[3] then fail('The currency purchase checks differ from the supported build. No new cheats were applied.') end
  end
  local getter,getCode=currencyMethod('PlayerInGameData','get_PlayerCurrency')
  local getterOld=hex('48 83 EC 08 48 89 0C 24 48 8B C1 48 63 40 28 48 83 C4 08 C3')
  if not same(getCode,getterOld) then fail('The currency reader has changed or is modified by another tool.') end
  local patches={}
  local hudOld=hex('48 8B 40 20 48 8B C8 48 63 55 F0 83 38 00')
  for _,class in ipairs({'OverworldUIHandler','CombatCurrencyLayout'}) do
    local address,code=currencyMethod(class,class=='OverworldUIHandler' and 'UpdatePlayerCurrency' or 'UpdateCurrencyInformation')
    local expected=hex('48 8B 40 20 48 8B C8 48 63 55 F0 83 38 00 48 8D 64 24 00')
    local actual={} for i=0x13+1,0x26 do actual[#actual+1]=code[i] end
    if not same(actual,expected) then fail('The currency display code differs from the supported build.') end
    patches[#patches+1]={address=address+0x13,old=hudOld}
  end
  local cave=B.currencyCave
  if cave and (cave.pid~=B.pid or cave.base~=B.base or cave.path~=B.path or getProcessAge()&lt;cave.age) then cave=nil end
  if not cave then
    local address=allocateMemory(4096)
    if not address or address==0 then fail('Cheat Engine could not reserve memory for the currency option.') end
    cave={address=address,flag=address+0xF00,pid=B.pid,base=B.base,path=B.path,age=getProcessAge()}
    B.currencyCave=cave
  end
  local body=hex('48 63 41 28 83 3D')
  append(body,packed('&lt;i4',cave.flag-(cave.address+11))); append(body,{0})
  local branches={}
  local function branch(op,label)
    append(body,hex(op)); branches[#branches+1]={at=#body,label=label}; append(body,{0,0,0,0})
  end
  branch('0F84','done')
  append(body,hex('4C 8B 1C 24')) -- caller's return address; no game pointers retained
  for _,address in ipairs(sites) do
    append(body,hex('49 BA')); append(body,packed('&lt;I8',address))
    append(body,hex('4D 3B DA')); branch('0F84','allowance')
  end
  local labels={done=#body}; append(body,{0xC3})
  labels.allowance=#body; append(body,hex('05 84 03 00 00')); branch('0F81','done')
  append(body,hex('B8 FF FF FF 7F C3')) -- saturate the displayed purchasing balance
  for _,fix in ipairs(branches) do
    local bytes=packed('&lt;i4',labels[fix.label]-(fix.at+4))
    for i=1,4 do body[fix.at+i]=bytes[i] end
  end
  for _,p in ipairs(patches) do
    while #body%16~=0 do body[#body+1]=0x90 end
    local entry=cave.address+#body
    append(body,p.old)
    local flagCheck=cave.address+#body
    append(body,hex('83 3D')); append(body,packed('&lt;i4',cave.flag-(flagCheck+7))); append(body,{0})
    append(body,hex('0F 84 11 00 00 00 81 C2 84 03 00 00 0F 81 05 00 00 00 BA FF FF FF 7F'))
    append(body,hex('FF 25 00 00 00 00')); append(body,packed('&lt;I8',p.address+#p.old))
    p.new=append(hex('FF 25 00 00 00 00'),packed('&lt;I8',entry))
  end
  if cave.code and not same(read(cave.address,#cave.code),cave.code) then fail('The reserved currency code was changed by another tool.') end
  put(cave.flag,{0,0,0,0}); put(cave.address,body); cave.code=body
  local jump=append(hex('FF 25 00 00 00 00'),packed('&lt;I8',cave.address))
  while #jump&lt;#getterOld do jump[#jump+1]=0x90 end
  patches[#patches+1]={address=getter,old=getterOld,new=jump}
  transaction(function()
    for _,p in ipairs(patches) do
      if not same(read(p.address,#p.old),p.old) then fail('Another tool changed the currency code. Disable it before enabling this option.') end
    end
    local ok,err=pcall(function()
      for _,p in ipairs(patches) do B.currencyPatches[#B.currencyPatches+1]=p; put(p.address,p.new) end
      put(cave.flag,{1,0,0,0})
    end)
    if not ok then
      pcall(put,cave.flag,{0,0,0,0})
      for i=#B.currencyPatches,1,-1 do
        local p=B.currencyPatches[i]
        if pcall(put,p.address,p.old) then table.remove(B.currencyPatches,i) end
      end
      error(err,0)
    end
  end)
  -- Reuse this single page across toggles/reloads. Retain it until game exit:
  -- a suspended game thread could still be returning from the tiny reader.
  -- Disabling its flag makes any in-flight reader return the natural balance.
  return true
end
function B.main()
  if not B.attach() then fail('Start Brutal Orchestra first. You can enable MAIN and the options at the main menu.') end
  if not B.mono then
    if not LaunchMonoDataCollector or LaunchMonoDataCollector()==0 then fail('Cheat Engine could not connect to the gameâ€™s Mono runtime. Wait until the main menu is loaded, then try again.') end
    B.mono=true
  end
  return true
end
local function target(name,pattern,offset,old)
  local method=mono_findMethod('','CharacterCombat',name)
  if not method or method==0 then fail('The party health routine is missing. This game build or mod setup needs a different table.') end
  local address=mono_compile_method(method)
  if not address or address==0 then fail('The party health routine could not be prepared. Wait until the main menu is loaded, then try again.') end
  local info=mono_getJitInfo(address)
  if not info or info.method~=method or info.code_start~=address or info.code_size&lt;32 or info.code_size&gt;16384 then
    fail('The party health routine could not be identified reliably. No new cheats were applied.')
  end
  local code=read(address,info.code_size)
  local found=nil
  for i=1,#code-#pattern+1 do
    local match=true
    for j=1,#pattern do if code[i+j-1]~=pattern[j] then match=false; break end end
    if match then
      if found then fail('The party health code is ambiguous. This game build or mod setup needs an updated table.') end
      found=address+i-1
    end
  end
  if not found then fail('The party health code differs from the supported build. No new cheats were applied.') end
  return {address=found+offset,old=old,new={0x90,0x90,0x90}}
end
function B.enable()
  if not row(4).Active then fail('Enable [MAIN] Brutal Orchestra first.') end
  B.main()
  if #B.patches&gt;0 then fail('Use Clear All to finish restoring the previous HP changes before enabling again.') end
  local class=mono_findClass('','CharacterCombat')
  local valid=false
  for _,field in ipairs(mono_class_enumFields(class,false) or {}) do
    if field.name=='_currentHealth' and field.offset==0xA0 and not field.isStatic then valid=true end
  end
  if not valid then fail('The party health layout has changed. This build needs an updated table.') end
  local patches={
    target('Damage',hex('48 63 87 A0 00 00 00 41 2B C6 33 C9 85 C0 48 0F 4F C8 89 4D 98 48 63 87 A0 00 00 00 4C 8B E8 44 2B E9'),7,hex('41 2B C6')),
    target('ManaDamage',hex('49 63 86 A0 00 00 00 2B 45 C0 33 C9 85 C0 48 0F 4F C8 89 4D B8 49 63 86 A0 00 00 00 2B C1'),7,hex('2B 45 C0'))
  }
  patches[#patches+1]=refillPatch()
  transaction(function()
    for _,p in ipairs(patches) do
      if not same(read(p.address,#p.old),p.old) then fail('Another modification changed the HP code. Disable it before enabling Infinite HP.') end
    end
    local ok,err=pcall(function()
      for _,p in ipairs(patches) do B.patches[#B.patches+1]=p; put(p.address,p.new) end
      put(B.hpCave.flag,{1,0,0,0})
    end)
    if not ok then
      pcall(put,B.hpCave.flag,{0,0,0,0})
      for i=#B.patches,1,-1 do
        local q=B.patches[i]
        if pcall(put,q.address,q.old) then table.remove(B.patches,i) end
      end
      error(err,0)
    end
  end)
  B.hpEnabled=true
  B.timer.Interval=500
  return true
end
local function invoke(fn)
  local ok,err=pcall(fn)
  if not ok then
    B.lastError=message(err)
    if not B.closing then showMessage(B.lastError) end
  end
  return ok
end
row(4).OnActivate=function(_,before) if before then return invoke(B.main) end return true end
row(4).OnDeactivate=function(_,before) if B.closing then return true end; if before then return invoke(function() B.disableAll(); row(10).Active=false; row(9).Active=false; row(8).Active=false; row(7).Active=false; row(6).Active=false; row(5).Active=false end) end return true end
row(5).OnActivate=function(_,before) if before then return invoke(B.enable) end return true end
row(5).OnDeactivate=function(_,before) if B.closing then return true end; if before then return invoke(B.disable) end return true end
row(6).OnActivate=function(_,before) if before then return invoke(B.enableCurrency) end return true end
row(6).OnDeactivate=function(_,before) if B.closing then return true end; if before then return invoke(B.disableCurrency) end return true end
row(7).OnActivate=function(_,before) if before then return invoke(B.enableActions) end return true end
row(7).OnDeactivate=function(_,before) if B.closing then return true end; if before then return invoke(B.disableActions) end return true end
row(8).OnActivate=function(_,before) if before then return invoke(B.enablePigment) end return true end
row(8).OnDeactivate=function(_,before) if B.closing then return true end; if before then return invoke(B.disablePigment) end return true end
row(9).OnActivate=function(_,before) if before then return invoke(B.enableMovement) end return true end
row(9).OnDeactivate=function(_,before) if B.closing then return true end; if before then return invoke(B.disableMovement) end return true end
row(10).OnActivate=function(_,before) if before then return invoke(B.enableEnemy) end return true end
row(10).OnDeactivate=function(_,before) if B.closing then return true end; if before then return invoke(B.disableEnemy) end return true end
row(1).OnActivate=function(_,before)
  if before then shellExecute('https://ko-fi.com/katzy'); return false end return true
end
row(2).OnActivate=function(_,before)
  if before then showMessage(B.help); return false end return true
end
row(3).OnActivate=function(_,before)
  if before then invoke(B.clear); return false end return true
end
function B.shutdown()
  if B.closing and B.closeAttempted then return B.closeComplete end
  if B.closing then B.closeAttempted=true end
  if B.stopped then return true end
  if B.timer then B.timer.Enabled=false end
  local ok,err=pcall(B.disableAll)
  B.closeComplete=ok
  if not ok then
    B.lastError=message(err)
    if not B.closing then return false end
  end
  if B.timer then B.timer.destroy(); B.timer=nil end
  if onTableLoad==B.tableHandler then onTableLoad=B.previousTableLoad end
  if getMainForm().OnClose==B.closeHandler then getMainForm().OnClose=B.previousClose end
  B.stopped=true
  return ok
end
B.previousTableLoad=onTableLoad
B.tableHandler=function(before,...)
  if before then B.shutdown() end
  if B.previousTableLoad then return B.previousTableLoad(before,...) end
end
onTableLoad=B.tableHandler
B.previousClose=getMainForm().OnClose
B.closeHandler=function(sender,action)
  if action~=caNone then
    B.closing=true
    local ok,err=pcall(B.shutdown)
    if not ok then B.diagnostic=tostring(err) end
  end
  if B.previousClose then
    local ok,result=pcall(B.previousClose,sender,action)
    if ok and result~=nil then return result end
    if not ok then B.diagnostic=tostring(result) end
  end
  return action
end
getMainForm().OnClose=B.closeHandler
row(0).OnDestroy=function() if not B.closing then B.shutdown() end end
B.timer=createTimer(nil,false)
B.timer.Interval=2000
B.timer.OnTimer=function()
  if B.closing or B.stopped then return end
  local ok,err=pcall(B.attach)
  if not ok then status(message(err)) end
  if ok and B.hpEnabled and identity() then
    local good,reason=pcall(put,B.hpCave.pending,{1,0,0,0})
    if not good then B.hpEnabled=false; status(message(reason)) end
  end
end
B.timer.Enabled=true
B.timer.OnTimer()

B.help=[==[
How to use - Katzy
Table identification: Katzy.
Brutal Orchestra 1.4.3 | Table v1.7

1. Open the table in Cheat Engine and allow its Lua script to run.
2. Start Brutal Orchestra. Auto-Attach and Version Check connects to the supported game automatically.
3. Tick [MAIN] Brutal Orchestra, then the options you want. Options can be enabled or disabled at the main menu and apply when a run starts.

Ignore Pigment Color: fill every ability cost slot with any available pigment. All selected pigments are still consumed, but wrong colors cause no mismatch damage. The required number of pigments, automatic pigment selection, overflow damage, and other damage remain unchanged. Empty slots still prevent performing the ability. Reselect the ability or change a filled slot to refresh an already-open damage preview after toggling.

Infinite Actions: using an ability no longer spends the character's action, allowing repeated attacks during your player turn. Pigment costs, action counters, attack effects, enemy turns, movement limits, and other status restrictions remain normal. Enable before attacking; a character whose action was already spent becomes available on the next normal action refresh or player turn. Disabling makes the next ability spend its action normally; it does not undo attacks already performed.

Infinite Currency: adds a reusable 900-coin purchasing allowance above your current earned balance. It covers shops, character recruitment, rank-ups, and dialogue currency checks. Gains increase the total normally. Spending uses earned coins first, stopping at the 900-coin allowance; disabling removes only the allowance and retains unspent earnings. Example: 900 + 25 earned = 925; spend 10 to show 915; spend another 30 to show 900; disable to retain 0 earned coins.

Currency displays refresh on their next normal update; reopen the party/shop menu or wait for the next currency change. The allowance is not written into saves and does not increase currency-based combat bonuses or unlock thresholds. Combat rewards, losses, and transfers keep their normal stored amounts.

Infinite HP: refills living party members on the combat field to their own maximum HP when enabled, then tops them up about every half-second while active. It also prevents normal damage, damage-over-time routed through normal damage, and pigment damage such as overflow or ability costs. New or swapped-in party members are included. Enemy HP remains unchanged.

Enable it at the main menu to refill the party when combat starts. Outside combat, the refill waits until the next combat. Dead characters are not revived. Scripted instant death is not blocked. Maximum-HP changes remain natural, and subsequent top-ups use the new maximum. Effects that require actual HP loss may not trigger while protected.

Infinite Movement: moving or swapping no longer spends the character's movement, allowing repeated manual moves during your player turn. Enable before moving; a character whose movement was already spent becomes available on the next normal movement refresh or player turn. Enemy turns, movement effects, and other status restrictions stay normal. Disabling makes the next move spend movement normally and leaves everyone in their current position. This option is independent of Infinite Actions.

Opponents to 1 HP: sets living opponents currently on the combat field to 1 HP once when enabled. New opponents start at 1 HP while the option is on. Health is not locked: damage and healing work normally afterward. Maximum health and party HP are unchanged; dead opponents are not revived. Enable at the main menu to apply when combat starts. Disabling restores normal starting HP for future opponents and leaves existing opponents at their current health. Toggling on again repeats the one-time reduction.

Untick an option to restore its original behavior. Unticking MAIN or using Clear All disables all options. Current HP is retained; prevented damage is not applied later. Closing Cheat Engine makes one silent cleanup attempt and preserves the close action even if cleanup fails. Table replacement also restores the code during orderly cleanup.

☕ Fuel the Cheats - Tip Katzy (Toggle to open my Ko-fi page): opens https://ko-fi.com/katzy only when selected, then stays unticked.
How to use - Katzy: shows these instructions and stays unticked.
Clear All: turns off all cheats and MAIN and stays unticked.
]==]
</LuaScript>
</CheatTable>