• Do not use Discord to host any images you post, these links expire quickly! You can learn how to add images to your posts here.
Resource icon

Resource Script for Disguise 2019-01-16

Poq

Cooltrainer
Member
Joined
Aug 7, 2018
Posts
113
Poq submitted a new resource:

Script for Disguise - Bust that Mimikyu

With a bit of trial and error, I've managed to put together a working script for Mimikyu's Disguise ability.

There have been a few threads about this topic over on the pokecommunity forums, and I posted a partial solution to this question here. However, there were some shortcomings with that script, mainly that Disguise was reset every time the Mimikyu switched out of battle, unlike in SM where it only...

Read more about this resource...
 

Uzagi

the bunny
Member
Joined
Feb 23, 2019
Posts
4
So I got a question, I have Mimikyu alternate forms in my game, how do I put the busted form to match the new disguise forms?
 

Poq

Cooltrainer
Member
Joined
Aug 7, 2018
Posts
113
So I got a question, I have Mimikyu alternate forms in my game, how do I put the busted form to match the new disguise forms?

Good question! This is actually something I've thought about, but haven't sat down to code yet. I think it could actually be pretty simple though. Here's an attempt.

Find the code for "getBustedForm" and edit to match the following
Ruby:
Expand Collapse Copy
  def getBustedForm
    if isConst?(self.species,PBSpecies,:MIMIKYU) && self.hasAbility?(:DISGUISE)
      cf=self.form
      return cf+1 if cf.even?
    else
      return-1
    end

The way this works assumes that for all your Mimikyu variants, the base form is an even number, and the busted form is the next sequential odd number (0=>1, 2=>3 ... 16=>17, etc.)
 
Last edited:

Uzagi

the bunny
Member
Joined
Feb 23, 2019
Posts
4
Good question! This is actually something I've thought about, but haven't sat down to code yet. I think it could actually be pretty simple though. Here's an attempt.

Find the code for "getBustedForm" and edit to match the following
Ruby:
Expand Collapse Copy
  def getBustedForm
    if isConst?(self.species,PBSpecies,:MIMIKYU) && self.hasAbility?(:DISGUISE)
      cf=self.form
      return cf+1 if cf.even?
    else
      return-1
    end

The way this works assumes that for all your Mimikyu variants, the base form is an even number, and the busted form is the next sequential odd number (0=>1, 2=>3 ... 16=>17, etc.)

Hey! I tested it and doesn't work @_@'
I'm using EBS, tho.
 

Poq

Cooltrainer
Member
Joined
Aug 7, 2018
Posts
113
Hey! I tested it and doesn't work @_@'
I'm using EBS, tho.

I don't think EBS should mess with this, but I haven't tested the solution... Try changing this altered version of the same code:

Ruby:
Expand Collapse Copy
  def getBustedForm
    if isConst?(self.species,PBSpecies,:MIMIKYU) && self.hasAbility?(:DISGUISE)
      cf=self.form.to_i
      return cf+1 if cf.even?
    else
      return-1
    end

The way this works assumes that for all your Mimikyu variants, the base form is an even number, and the busted form is the next sequential odd number (0=>1, 2=>3 ... 16=>17, etc.)
 
Last edited:

Uzagi

the bunny
Member
Joined
Feb 23, 2019
Posts
4
I don't think EBS should mess with this, but I haven't tested the solution... Try changing this altered version of the same code:

Ruby:
Expand Collapse Copy
  def getBustedForm
    if isConst?(self.species,PBSpecies,:MIMIKYU) && self.hasAbility?(:DISGUISE)
      cf=self.form.to_i
      return cf+1 if cf.even?
    else
      return-1
    end

The way this works assumes that for all your Mimikyu variants, the base form is an even number, and the busted form is the next sequential odd number (0=>1, 2=>3 ... 16=>17, etc.)

still doesn't work :(
I tried to do some modifications by myself too, but don't work either
do u have discord, if you have time we can try to figure this out together (I'm kinda noob on coding, but I can test)
 

Poq

Cooltrainer
Member
Joined
Aug 7, 2018
Posts
113
Yeah, you can find me through the relic castle discord. If we find a solution, I'll post it here.
 

Poq

Cooltrainer
Member
Joined
Aug 7, 2018
Posts
113
So I got a question, I have Mimikyu alternate forms in my game, how do I put the busted form to match the new disguise forms?
Okay, I found a fix that is less than pretty, but which does the trick. Find the code for "getBustedForm" and make these changes:
Code:
Expand Collapse Copy
  def getBustedForm
    if isConst?(self.species,PBSpecies,:MIMIKYU) && self.hasAbility?(:DISGUISE)
      MIMIKYUS.each do |df|
        if df[0] == self.form
          return df[1]
        elsif df[1] == self.form
          return df[1]
        end
      end
    else
      return-1
    end
  end
end

MIMIKYUS=[[0,1],[2,3],[4,5]]#add additional pairs as necessary

Basically, what you do is create a constant (outside of a class)that is an array containing smaller arrays. each array is a pair containing first, a base form and second a busted form. The script now checks which of these pairs the Mimikyu's current form is a part of and identifies whether it is busted or disguised from there. It's a little clunky, but it works.
 
Back
Top