<mamecheat version="1">

  <cheat desc="Infinite Credits">
    <script state="run">
      <action>maincpu.pb@E000=99</action>
    </script>
  </cheat>

  <cheat desc="Infinite Time">
    <script state="run">
      <action>maincpu.pd@E1AF=00099902|(maincpu.pd@E1AF BAND ~00FFFFFF)</action>
    </script>
  </cheat>

  <cheat desc="Infinite Lives">
    <script state="run">
      <action>maincpu.pb@E12F=05</action>
    </script>
  </cheat>

  <cheat desc="Infinite Energy">
    <script state="run">
      <action>maincpu.pb@E2B7=9F</action>
    </script>
  </cheat>

  <cheat desc="Invincibility">
    <script state="on">
      <action>temp0 =maincpu.mw@259E</action>
      <action>temp1 =maincpu.mw@4110</action>
      <action>temp2 =maincpu.mw@42DF</action>
      <action>temp3 =maincpu.mb@42E2</action>
      <action>temp4 =maincpu.mw@4676</action>
      <action>temp5 =maincpu.mb@4679</action>
    </script>
    <script state="run">
      <action>maincpu.mw@259E=281B</action>
      <action>maincpu.mw@4110=409B</action> <!-- 1st = Water [ld a,$281B -always load 0xFF-] -->
      <action>maincpu.mw@42DF=2A33</action> <!-- 2nd = Fire [ld a,$409B -always load 0x00-] -->
      <action>maincpu.mb@42E2=DD</action> <!-- 3rd + 4th = Enemy 1 [call $2A33 xor a / ret / jp z,$41DD [ret]] -->
      <action>maincpu.mw@4676=2A33</action> <!-- Enemy 2 [call $2A33 [xor a / ret]] -->
      <action>maincpu.mb@4679=DD</action> <!-- Enemy 2 [jp z,$41DD [ret]] -->
    </script>
    <script state="off">
      <action>maincpu.mw@259E=temp0 </action>
      <action>maincpu.mw@4110=temp1 </action>
      <action>maincpu.mw@42DF=temp2 </action>
      <action>maincpu.mb@42E2=temp3 </action>
      <action>maincpu.mw@4676=temp4 </action>
      <action>maincpu.mb@4679=temp5 </action>
    </script>
  </cheat>

  <cheat desc="Select Magic Item">
    <parameter>
      <item value="0x01">Crystal</item>
      <item value="0x02">Y.Stone</item>
      <item value="0x03">R.Stone</item>
      <item value="0x04">B.Stone</item>
      <item value="0x05">Book</item>
    </parameter>
    <script state="run">
      <action condition="(param==01)">maincpu.pb@E1E1=E4</action>
      <action condition="(param==01)">maincpu.pb@E1E3=01</action>
      <action condition="(param==02)">maincpu.pb@E1E1=E4</action>
      <action condition="(param==02)">maincpu.pb@E1E3=02</action>
      <action condition="(param==03)">maincpu.pb@E1E1=E4</action>
      <action condition="(param==03)">maincpu.pb@E1E3=03</action>
      <action condition="(param==04)">maincpu.pb@E1E1=E4</action>
      <action condition="(param==04)">maincpu.pb@E1E3=04</action>
      <action condition="(param==05)">maincpu.pb@E1E1=E4</action>
      <action condition="(param==05)">maincpu.pb@E1E3=06</action>
    </script>
  </cheat>

  <cheat desc="Select Extra Item"> <comment>Waterproof (walk on a water without damage), Armor (decreasing energy is 1/4), Shield (decreasing energy is 1/2) Bracelet (Cursed item - You can't use a sword attack), Blue Ring (Cursed item - You can't use a magic item).</comment>
    <parameter>
      <item value="0x00">No Item</item>
      <item value="0x02">Waterproof</item>
      <item value="0x04">Armor</item>
      <item value="0x05">Shield</item>
      <item value="0x11">Bracelet</item>
      <item value="0x12">Blue Ring</item>
    </parameter>
    <script state="run">
      <action>maincpu.pb@E1AC=param</action>
    </script>
  </cheat>

  <cheat desc="Always Have Swords (TEST)"> <comment>It seems that sword-power doesn't change</comment>
    <script state="run">
      <action>maincpu.pb@E148=4D</action>
      <action>maincpu.pd@E14A=000A0908|(maincpu.pd@E14A BAND ~00FFFFFF)</action>
    </script>
  </cheat>

  <cheat desc="Always Have Healing Potion">
    <script state="run">
      <action>maincpu.pb@E1AD=01</action>
    </script>
  </cheat>

  <cheat desc="Always Have Treasures">
    <script state="run">
      <action>maincpu.pb@E152=5A</action>
      <action>maincpu.pd@E154=00090603|(maincpu.pd@E154 BAND ~00FFFFFF)</action>
      <action>maincpu.pd@E157=00120F0C|(maincpu.pd@E157 BAND ~00FFFFFF)</action>
    </script>
  </cheat>

  <cheat desc="Rapid Fire - Sword">
    <script state="run">
      <action>maincpu.pb@E009=00|(maincpu.pb@E009 BAND ~10)</action>
    </script>
  </cheat>

  <cheat desc="Rapid Fire - Magic">
    <script state="run">
      <action>maincpu.pb@E009=00|(maincpu.pb@E009 BAND ~20)</action>
    </script>
  </cheat>

</mamecheat>
<!-- Cheat file downloaded from http://www.mamecheat.co.uk, see cheat.txt for list of contributors. -->
