<?xml version="1.0" encoding="utf-8"?>
<CheatTable CheatEngineTableVersion="50">
  <CheatEntries>
    <CheatEntry>
      <ID>95</ID>
      <Description>"Main Script"</Description>
      <Options moHideChildren="1" moDeactivateChildrenAsWell="1"/>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript Async="1">[ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
{$lua}
if syntaxcheck then return end

if (LaunchDotNetInterface() == nil) then
  showErrorMessage("Failed to load .NET Interface.")
end

registeredSymbols = {}
function pRegisterNET(className, methodName)
  local address = dotnet_findDotNetMethodAddress('', className, methodName)
  if address == nil then
    showErrorMessage("Couldn't find the function "..className.."::"..methodName)
  else
    local symbolName = className.."::"..methodName
    registerSymbol(symbolName, address, true)
    table.insert(registeredSymbols, symbolName)
  end
end

pRegisterNET('Paris.Game.Menu.CharacterSelectionPanel','ApplyNinjaPowerHUDVisibility')
pRegisterNET('Paris.Game.System.Stage','Tick')
pRegisterNET('Paris.Game.System.GamePlayerInfo','set_Score')
pRegisterNET('Paris.Game.Actor.ChallengeInfo','set_RemainingCount')


{$asm}
define(CharacterSelectionPanelApplyNinjaPowerHUDVisibility,Paris.Game.Menu.CharacterSelectionPanel::ApplyNinjaPowerHUDVisibility)
define(pStageTimer,Paris.Game.System.Stage::Tick+B4)
alloc(newmem,1024,CharacterSelectionPanelApplyNinjaPowerHUDVisibility)
label(returnhere pCharAddress oriANPHcode damageTaker pImmoral pInfo pPlayerHP pPowerNP pTimerComb pComboTimer pLevelTime exit)

newmem: //this is allocated memory, you have read,write,execute access
//place your code here
push rax
mov rax,pCharAddress
mov [rax],rcx
mov rax,[rcx+1c8]
lea rax,[rax]
mov [damageTaker],rax
cmp byte ptr[pImmoral],01
jne @f
mov byte ptr[rax+20],01
@@:
pop rax
push rbx
mov rbx,[rcx+580]
lea rbx,[rbx]
mov [pInfo],rbx
cmp byte ptr[pPlayerHP],01
jne @f
fild dword ptr[rbx+38]
fistp dword ptr[rbx+3c]
@@:
cmp byte ptr[pPowerNP],01
jne @f
fild dword ptr[rbx+50]
fistp dword ptr[rbx+4c]
@@:
cmp byte ptr[pComboTimer],01
jne @f
movss xmm1,[rbx+58]
maxss xmm1,[pTimerComb]
movss [rbx+58],xmm1
@@:
pop rbx
cmp byte ptr[pLevelTime],01
jne @f
push rax
mov rax,pStageTimer
lea rax,[rdx+84]
movss xmm2,[rax]
minss xmm2,[pMaxStgTimer]
movss [rdx+84],xmm2
pop rax
@@:


oriANPHcode:
readmem(CharacterSelectionPanelApplyNinjaPowerHUDVisibility+3C,7)
//mov edx,[rcx]
//mov edx,00000001

exit:
jmp returnhere

pCharAddress:
dq 00

damageTaker:
dq 00

pInfo:
dq 00

pTimerComb:
dq (float)1

pMaxStgTimer:
dd (float)10


pImmoral:
dd 00

pPlayerHP:
dd 00

pPowerNP:
dd 00

pComboTimer:
dd 00

pLevelTime:
dd 00

CharacterSelectionPanelApplyNinjaPowerHUDVisibility+3C:
jmp newmem
nop 2
returnhere:
registersymbol(pCharAddress pStageTimer oriANPHcode CharacterSelectionPanelApplyNinjaPowerHUDVisibility damageTaker pImmoral pInfo pPlayerHP pPowerNP pComboTimer pLevelTime)

[DISABLE]
//code from here till the end of the code will be used to disable the cheat

CharacterSelectionPanelApplyNinjaPowerHUDVisibility+3C:
readmem(oriANPHcode,7)
//db 8B 11 BA 01 00 00 00
//mov edx,[rcx]
//mov edx,00000001
unregistersymbol(*)
dealloc(newmem)

{$lua}
if registeredSymbols then
    for i, sym in ipairs(registeredSymbols) do
        unregisterSymbol(sym)
    end
    registeredSymbols = {}
end
</AssemblerScript>
      <CheatEntries>
        <CheatEntry>
          <ID>96</ID>
          <Description>"Invincibility"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
pImmoral:
db 01

 
 
[DISABLE]
//code from here till the end of the code will be used to disable the cheat
pImmoral:
db 00

{$lua}
writeByte('[damageTaker]+20',00)
</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>97</ID>
          <Description>"Infinite Hp"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
pPlayerHP:
db 01

 
 
[DISABLE]
//code from here till the end of the code will be used to disable the cheat
pPlayerHP:
db 00
</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>98</ID>
          <Description>"Infinite Ninja Power"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
pPowerNP:
db 01

 
 
[DISABLE]
//code from here till the end of the code will be used to disable the cheat
pPowerNP:
db 00
</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>102</ID>
          <Description>"Infinite Time Combo"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
pComboTimer:
db 01

 
[DISABLE]
//code from here till the end of the code will be used to disable the cheat
pComboTimer:
db 00
</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>109</ID>
          <Description>"Score Multiplier (Fast Level Up)"</Description>
          <Options moHideChildren="1"/>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
alloc(newmem,1024,Paris.Game.System.GamePlayerInfo::set_Score+9E)
label(returnhere oriScorecode pMulScore exit)

newmem: //this is allocated memory, you have read,write,execute access
//place your code here
add edi,[pMulScore]

oriScorecode:
readmem(Paris.Game.System.GamePlayerInfo::set_Score+9E,7)
//mov [rcx+20],edi
//add rsp,28

exit:
jmp returnhere

pMulScore:
dd 00

Paris.Game.System.GamePlayerInfo::set_Score+9E:
jmp newmem
nop 2
returnhere:
registersymbol(pMulScore oriScorecode)
 
[DISABLE]
//code from here till the end of the code will be used to disable the cheat
Paris.Game.System.GamePlayerInfo::set_Score+9E:
readmem(oriScorecode,7)
//db 89 79 20 48 83 C4 28
//mov [rcx+20],edi
//add rsp,28
unregistersymbol(*)
dealloc(newmem)
</AssemblerScript>
          <CheatEntries>
            <CheatEntry>
              <ID>110</ID>
              <Description>"multiply by"</Description>
              <DropDownList ReadOnly="1" DescriptionOnly="1" DisplayValueAsItem="1">0:Normal
1:2x
2:3x
4:5x
9:10x
19:20x
49:50x
99:100x
</DropDownList>
              <ShowAsSigned>0</ShowAsSigned>
              <VariableType>4 Bytes</VariableType>
              <Address>pMulScore</Address>
            </CheatEntry>
          </CheatEntries>
        </CheatEntry>
        <CheatEntry>
          <ID>114</ID>
          <Description>"Stop Time Stage/Level"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
pLevelTime:
db 01


[DISABLE]
//code from here till the end of the code will be used to disable the cheat
pLevelTime:
db 00

</AssemblerScript>
        </CheatEntry>
        <CheatEntry>
          <ID>116</ID>
          <Description>"Easy Completed Challenge"</Description>
          <VariableType>Auto Assembler Script</VariableType>
          <AssemblerScript>[ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
alloc(newmem,1024,Paris.Game.Actor.ChallengeInfo::set_RemainingCount+4)
label(returnhere oriChallcode exit)

newmem: //this is allocated memory, you have read,write,execute access
//place your code here
sub edx,[rcx+28]

oriChallcode:
readmem(Paris.Game.Actor.ChallengeInfo::set_RemainingCount+4,5)
//mov [rcx+20],edx
//test edx,edx

exit:
jmp returnhere

Paris.Game.Actor.ChallengeInfo::set_RemainingCount+4:
jmp newmem
returnhere:
registersymbol(oriChallcode)
 
[DISABLE]
//code from here till the end of the code will be used to disable the cheat
Paris.Game.Actor.ChallengeInfo::set_RemainingCount+4:
readmem(oriChallcode,5)
//db 89 51 20 85 D2
//mov [rcx+20],edx
//test edx,edx
unregistersymbol(oriChallcode)
dealloc(newmem)
</AssemblerScript>
        </CheatEntry>
      </CheatEntries>
    </CheatEntry>
  </CheatEntries>
  <UserdefinedSymbols/>
</CheatTable>
