• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Poketcg] Need help with coding energy requirements for AI

Cataclyptic

Everything I say is a lie
  • 174
    Posts
    9
    Years
    When hacking poketcg, there is an annoying problem that myself and others keep running into: The inability for the AI to understand and process multiple energy types combined with colorless energy. In the official game this never comes up because the game only uses single energy types + colorless. But for many hacks out there, including my own, we want to expand the range of options for our cards by adding multiple energy types per attack, plus colorless.

    I will post the code for how the AI determines what to do down below, but for now I want to give examples of how this works.

    Attack 1 cost: 1 Lightning, 1 Colorless = No issue, AI can understand.
    Attack 2 cost: 1 Lightning, 1 Fire = No issue, AI can understand.
    Attack 3 cost: 1 Lightning, 1 Fire, 1 Colorless = The AI cannot understand; in game it cheats by doing the attack with only 1 fire and 1 lightning attached, ignoring the colorless.
    Attack 4 cost: 1 Lightning, 1 Fire, 2 Colorless = The AI cannot understand; in game it cheats by doing the attack with only 1 fire, 1 lightning, and 1 of any energy.
    Hopefully these examples mae it clear that two energies + colorless = the AI ignores 1 colorless in the cost of the attack.

    I have tried to impliment a new code o correct this but I couldn't do it, so I am throwing it into thr wilds in hopes that someone else can.

    This code is found in src > Engine > Duel > Ai > Core at line 385-486. Also contains a note from the pret developers detailling this issue.
    Spoiler:
     
    Back
    Top