• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Conquest protagonist in the poll by clicking here.
  • 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

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