Jump to content

A Suggestion for Improving AI, shown through Cynthia's Battlefield


BluePen

Recommended Posts

I hope this is the right thread to post, if not please do tell me so that I can move it somewhere else.^^

 

Short Description

  Reveal hidden contents

 

Codes for AI switching out Pokémon

  Reveal hidden contents

 

Explanation for Cynthia's AI

  Reveal hidden contents

 

Cynthia's Team in PBS: trainers

  Reveal hidden contents

 

PBS: trainertypes

  Reveal hidden contents

 

Graphic: Character/Battlebacks

  Reveal hidden contents

 

PokeBattle_Battle:

  Reveal hidden contents

 

PokeBattle_ActualScene

I put the codes under spoiler. There should be two of them under spoiler

1) Directly under 

elsif $feoverride == 42
        backdrop="CityNew"

 

 

 

2) Directly under

elsif backdrop=="CityNew"
      fieldbd = 42

 

 

 

PokeBattle_ZMoves

Replace

 

 

With

 

 

This will activate Sand Force

 

Above

 

 

Please put this

 

 

This allows you to boost Spiritomb's ZMoves.

 

Replace

 

 

 

With

 

 

 

If you see this

 

 

Put the following codes under it.

 

 

 

Above

 

 

 

Put this

 

 

 

PokeBattle_Move

Under

 

 

 Put this

 

 

If Lucario switches in, it will receive no damage because the runes increase its aura abilities and its flexibility.

 

If you see this

 

 

 

Put the following codes under it

 

 

This is a gimmick from the Pokémon Trading Card Game, Sky Ridge. Some moves get additional type in Cynthia's field. So it's like Flying Press, only better. For example: Ancient Power becomes a Rock/Fire move. If your opponent has Flashfire, it's only a Rock move. What's also important to mention is the primary type. ExtraSensory is a psychic move. While it gets an additional Ice type, it won't affect a Dark Pokémon.

 

Under: return true if opponent.effects[PBEffects::Telekinesis]>0

 

Put this

 

 

Due to increased aura abilities, Lucario's moves have perfect accuracy

 

Above

 

 

 

Put this

 

 

 

If you see this: return true if @function==0xA0 # Frost Breath

 

Put the following codes under it:

 

 

Mega Garchomp will always land a critical hit in this field. That's a reference to the Pokédex, which says that due to its transformation it is enraged

 

Replace

 

 

 

With

 

 

 

If you see this

 

 

 

Put the following codes under it

 

 

This will boost certain moves.

 

Above

 

 

 

Put this

 

 

 

Replace

 

 

 

With

 

 

Marvel Scale is activated. If Lucky Chant is active, it will boost Special Defense.

 

Under

 

 

 

Put this

 

 

This will boost, for example, Psychic moves.

 

Above

 

 

 

Put this

 

 

 

PokeBattle_Battler

If you see this

 

 

 

Put this under it

 

 

Rune do not only heal, they also boost your defense, hence why certain abilities get boosted!

 

If you see this

 

 

 

Put this under it.

 

 

Free Poison if you touch Roserade.

 

Above

 

 

 

Put this

 

 

It's like Rough Skin, but if you happen to have Forewarn or Anticipation, you won't receive any damages.

 

Above

 

 

 

Put this

 

 

If you attack Spiritomb, you will be put under the effect of Torment.

If Togekiss faints, it will bless the field with a lucky chant.

 

PokeBattle_AI: Again, I know

Now that you implemented all the features of Cynthia's field, the AI has to know what they all do, otherwise the AI won't fight as effectively as they should. Therefore, it's important to include the following codes. 

 

If you see this

 

 

 

Replace it with this.

 

 

This makes sure that AI knows that Togekiss and Garchomp have priority during their first turn, which is why Garchomp will most likely use Dragon Rush to finish off a fast, weakened Pkm. While Cynthia's Garchomp doesn't have Dragon Rush, I included this code for consistency, and maybe you want to teach her Garchomp Dragon Rush.

 

Above

 

 

 

Put this

 

 

 

Above

 

 

 

Put this

 

 

 

Replace

 

 

 

With

 

 

 

Above

 

 

 

Put this

 

 

 

Above

 

 

 

Put this

 

 

 

Under

 

 

 

Put this

 

 

 

If you see this: return 3 if move.function==0xA0 # Frost Breath

 

Put the following codes under it

 

 

 

If you see this: accuracy=100 if opponent.effects[PBEffects::Telekinesis]>0

 

Put the following codes under it

 

 

 

Replace this

 

 

 

With

 

 

If you use status moves such as Will o Wisp or Thunder Wave, AI will switch out their Pkm and use Lucario or Spiritomb as they get healed by the field.

 

If you see this AGAIN, replace this

 

 

 

With

 

 

 

Under

 

 

 

Put this

 

 

 

 

If you see this AGAIN, then

 

 

 

Put the following codes under it

 

 

 

If you see this

 

 

 

Replace it with this:

 

 

 

Under

 

 

 

Put this

 

 

 

 

Edited by BluePen
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...