<?xml version="1.0" encoding="utf-8"?>
<CheatTable CheatEngineTableVersion="38">
  <CheatEntries>
    <CheatEntry>
      <ID>6</ID>
      <Description>"always 99 food at the end of the turn"</Description>
      <LastState Activated="1"/>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>[ENABLE]

aobscan(food,0D 00 00 48 8B 40 20 48 63 48 4C 03 CF 89 48 4C) // should be unique
alloc(newmem,$1000,food)

label(code)
label(return)

newmem:
  mov ecx,#99
code:
  // add ecx,edi
  mov [rax+4C],ecx
  jmp return

food+0B:
  jmp newmem
return:
registersymbol(food)

[DISABLE]

food+0B:
  db 03 CF 89 48 4C

unregistersymbol(food)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: UserManager:EndTurn+1ba

UserManager:EndTurn+18e: 48 8B 45 80                    - mov rax,[rbp-80]
UserManager:EndTurn+192: 48 8B F8                       - mov rdi,rax
UserManager:EndTurn+195: 2B F9                          - sub edi,ecx
UserManager:EndTurn+197: 48 B8 60 3C 76 32 94 01 00 00  - mov rax,0000019432763C60
UserManager:EndTurn+1a1: 48 8B 00                       - mov rax,[rax]
UserManager:EndTurn+1a4: 48 8B 40 18                    - mov rax,[rax+18]
UserManager:EndTurn+1a8: 83 78 18 00                    - cmp dword ptr [rax+18],00
UserManager:EndTurn+1ac: 0F 86 8F 0D 00 00              - jbe UserManager:EndTurn+f41
UserManager:EndTurn+1b2: 48 8B 40 20                    - mov rax,[rax+20]
UserManager:EndTurn+1b6: 48 63 48 4C                    - movsxd  rcx,dword ptr [rax+4C]
// ---------- INJECTING HERE ----------
UserManager:EndTurn+1ba: 03 CF                          - add ecx,edi
// ---------- DONE INJECTING  ----------
UserManager:EndTurn+1bc: 89 48 4C                       - mov [rax+4C],ecx
UserManager:EndTurn+1bf: 48 B8 60 3C 76 32 94 01 00 00  - mov rax,0000019432763C60
UserManager:EndTurn+1c9: 48 8B 00                       - mov rax,[rax]
UserManager:EndTurn+1cc: 48 8B 40 18                    - mov rax,[rax+18]
UserManager:EndTurn+1d0: 83 78 18 01                    - cmp dword ptr [rax+18],01
UserManager:EndTurn+1d4: 0F 86 5D 0D 00 00              - jbe UserManager:EndTurn+f37
UserManager:EndTurn+1da: 48 8B 40 28                    - mov rax,[rax+28]
UserManager:EndTurn+1de: 48 63 48 4C                    - movsxd  rcx,dword ptr [rax+4C]
UserManager:EndTurn+1e2: 2B CF                          - sub ecx,edi
UserManager:EndTurn+1e4: 89 48 4C                       - mov [rax+4C],ecx
}
</AssemblerScript>
    </CheatEntry>
    <CheatEntry>
      <ID>10</ID>
      <Description>"99 Wood when gathering it"</Description>
      <LastState Activated="1"/>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>{ Game   : kvk.exe
  Version: 
  Date   : 2021-08-19
  Author : Ich

  This script does blah blah blah
}

[ENABLE]

aobscan(wood,20 48 63 48 50 03 CF 89 48 50) // should be unique
alloc(newmem,$1000,wood)

label(code)
label(return)

newmem:
 mov ecx,#99
code:
  //add ecx,edi
  mov [rax+50],ecx
  jmp return

wood+05:
  jmp newmem
return:
registersymbol(wood)

[DISABLE]

wood+05:
  db 03 CF 89 48 50

unregistersymbol(wood)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: GameManager:SetPlayerWood+8a

GameManager:SetPlayerWood+56: 49 BB A0 35 B9 3C 94 01 00 00  - mov r11,UIManager:GiveToPlayer
GameManager:SetPlayerWood+60: 41 FF D3                       - call r11
GameManager:SetPlayerWood+63: 48 B8 60 3C 76 32 94 01 00 00  - mov rax,0000019432763C60
GameManager:SetPlayerWood+6d: 48 8B 00                       - mov rax,[rax]
GameManager:SetPlayerWood+70: 48 8B 40 70                    - mov rax,[rax+70]
GameManager:SetPlayerWood+74: 48 8B 40 18                    - mov rax,[rax+18]
GameManager:SetPlayerWood+78: 83 78 18 00                    - cmp dword ptr [rax+18],00
GameManager:SetPlayerWood+7c: 0F 86 57 01 00 00              - jbe GameManager:SetPlayerWood+1d9
GameManager:SetPlayerWood+82: 48 8B 40 20                    - mov rax,[rax+20]
GameManager:SetPlayerWood+86: 48 63 48 50                    - movsxd  rcx,dword ptr [rax+50]
// ---------- INJECTING HERE ----------
GameManager:SetPlayerWood+8a: 03 CF                          - add ecx,edi
// ---------- DONE INJECTING  ----------
GameManager:SetPlayerWood+8c: 89 48 50                       - mov [rax+50],ecx
GameManager:SetPlayerWood+8f: 48 B8 60 3C 76 32 94 01 00 00  - mov rax,0000019432763C60
GameManager:SetPlayerWood+99: 48 8B 00                       - mov rax,[rax]
GameManager:SetPlayerWood+9c: 48 8B 40 30                    - mov rax,[rax+30]
GameManager:SetPlayerWood+a0: 48 B9 60 3C 76 32 94 01 00 00  - mov rcx,0000019432763C60
GameManager:SetPlayerWood+aa: 48 8B 09                       - mov rcx,[rcx]
GameManager:SetPlayerWood+ad: 48 8B 49 70                    - mov rcx,[rcx+70]
GameManager:SetPlayerWood+b1: 48 8B 49 18                    - mov rcx,[rcx+18]
GameManager:SetPlayerWood+b5: 83 79 18 00                    - cmp dword ptr [rcx+18],00
GameManager:SetPlayerWood+b9: 0F 86 13 01 00 00              - jbe GameManager:SetPlayerWood+1d2
}
</AssemblerScript>
    </CheatEntry>
    <CheatEntry>
      <ID>12</ID>
      <Description>"99 Gold when gathering it"</Description>
      <LastState Activated="1"/>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>[ENABLE]

aobscan(gold,20 48 63 48 54 03 CF 89 48 54) // should be unique
alloc(newmem,$1000,gold)

label(code)
label(return)

newmem:
  mov ecx,#99
code:
  //add ecx,edi
  mov [rax+54],ecx
  jmp return

gold+05:
  jmp newmem
return:
registersymbol(gold)

[DISABLE]

gold+05:
  db 03 CF 89 48 54

unregistersymbol(gold)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: GameManager:SetPlayerGold+8a

GameManager:SetPlayerGold+56: 49 BB A0 35 B9 3C 94 01 00 00  - mov r11,UIManager:GiveToPlayer
GameManager:SetPlayerGold+60: 41 FF D3                       - call r11
GameManager:SetPlayerGold+63: 48 B8 60 3C 76 32 94 01 00 00  - mov rax,0000019432763C60
GameManager:SetPlayerGold+6d: 48 8B 00                       - mov rax,[rax]
GameManager:SetPlayerGold+70: 48 8B 40 70                    - mov rax,[rax+70]
GameManager:SetPlayerGold+74: 48 8B 40 18                    - mov rax,[rax+18]
GameManager:SetPlayerGold+78: 83 78 18 00                    - cmp dword ptr [rax+18],00
GameManager:SetPlayerGold+7c: 0F 86 57 01 00 00              - jbe GameManager:SetPlayerGold+1d9
GameManager:SetPlayerGold+82: 48 8B 40 20                    - mov rax,[rax+20]
GameManager:SetPlayerGold+86: 48 63 48 54                    - movsxd  rcx,dword ptr [rax+54]
// ---------- INJECTING HERE ----------
GameManager:SetPlayerGold+8a: 03 CF                          - add ecx,edi
// ---------- DONE INJECTING  ----------
GameManager:SetPlayerGold+8c: 89 48 54                       - mov [rax+54],ecx
GameManager:SetPlayerGold+8f: 48 B8 60 3C 76 32 94 01 00 00  - mov rax,0000019432763C60
GameManager:SetPlayerGold+99: 48 8B 00                       - mov rax,[rax]
GameManager:SetPlayerGold+9c: 48 8B 40 30                    - mov rax,[rax+30]
GameManager:SetPlayerGold+a0: 48 B9 60 3C 76 32 94 01 00 00  - mov rcx,0000019432763C60
GameManager:SetPlayerGold+aa: 48 8B 09                       - mov rcx,[rcx]
GameManager:SetPlayerGold+ad: 48 8B 49 70                    - mov rcx,[rcx+70]
GameManager:SetPlayerGold+b1: 48 8B 49 18                    - mov rcx,[rcx+18]
GameManager:SetPlayerGold+b5: 83 79 18 00                    - cmp dword ptr [rcx+18],00
GameManager:SetPlayerGold+b9: 0F 86 13 01 00 00              - jbe GameManager:SetPlayerGold+1d2
}
</AssemblerScript>
    </CheatEntry>
    <CheatEntry>
      <ID>14</ID>
      <Description>"99 Potions when gathering it"</Description>
      <LastState Activated="1"/>
      <VariableType>Auto Assembler Script</VariableType>
      <AssemblerScript>[ENABLE]
aobscan(potions,20 48 63 48 58 03 CF 89 48 58) // should be unique
alloc(newmem,$1000,potions)

label(code)
label(return)

newmem:
  mov ecx,#99
code:
  // add ecx,edi
  mov [rax+58],ecx
  jmp return

potions+05:
  jmp newmem
return:
registersymbol(potions)

[DISABLE]

potions+05:
  db 03 CF 89 48 58

unregistersymbol(potions)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: GameManager:SetPlayerScience+8a

GameManager:SetPlayerScience+56: 49 BB A0 35 B9 3C 94 01 00 00  - mov r11,UIManager:GiveToPlayer
GameManager:SetPlayerScience+60: 41 FF D3                       - call r11
GameManager:SetPlayerScience+63: 48 B8 60 3C 76 32 94 01 00 00  - mov rax,0000019432763C60
GameManager:SetPlayerScience+6d: 48 8B 00                       - mov rax,[rax]
GameManager:SetPlayerScience+70: 48 8B 40 70                    - mov rax,[rax+70]
GameManager:SetPlayerScience+74: 48 8B 40 18                    - mov rax,[rax+18]
GameManager:SetPlayerScience+78: 83 78 18 00                    - cmp dword ptr [rax+18],00
GameManager:SetPlayerScience+7c: 0F 86 57 01 00 00              - jbe GameManager:SetPlayerScience+1d9
GameManager:SetPlayerScience+82: 48 8B 40 20                    - mov rax,[rax+20]
GameManager:SetPlayerScience+86: 48 63 48 58                    - movsxd  rcx,dword ptr [rax+58]
// ---------- INJECTING HERE ----------
GameManager:SetPlayerScience+8a: 03 CF                          - add ecx,edi
// ---------- DONE INJECTING  ----------
GameManager:SetPlayerScience+8c: 89 48 58                       - mov [rax+58],ecx
GameManager:SetPlayerScience+8f: 48 B8 60 3C 76 32 94 01 00 00  - mov rax,0000019432763C60
GameManager:SetPlayerScience+99: 48 8B 00                       - mov rax,[rax]
GameManager:SetPlayerScience+9c: 48 8B 40 30                    - mov rax,[rax+30]
GameManager:SetPlayerScience+a0: 48 B9 60 3C 76 32 94 01 00 00  - mov rcx,0000019432763C60
GameManager:SetPlayerScience+aa: 48 8B 09                       - mov rcx,[rcx]
GameManager:SetPlayerScience+ad: 48 8B 49 70                    - mov rcx,[rcx+70]
GameManager:SetPlayerScience+b1: 48 8B 49 18                    - mov rcx,[rcx+18]
GameManager:SetPlayerScience+b5: 83 79 18 00                    - cmp dword ptr [rcx+18],00
GameManager:SetPlayerScience+b9: 0F 86 13 01 00 00              - jbe GameManager:SetPlayerScience+1d2
}
</AssemblerScript>
    </CheatEntry>
  </CheatEntries>
  <UserdefinedSymbols/>
</CheatTable>
