- 2
- Posts
- 7
- Years
- Seen Jul 23, 2019
Spoiler:
if isConst?(pokemon.species,PBSpecies,:ZYGARDE)
commands=[_INTL("Change Forme"),_INTL("Change Ability"),_INTL("Deconstruct"),_INTL("Cancel")]
command=scene.pbShowCommands(_INTL("Do what with {1}?",pokemon.name),commands)
if command==0
if scene.pbConfirm(_INTL("Change Zygarde to its 10% Forme?"))
pokemon.species = 803
if !pokemon.hasHiddenAbility?
@data[26]+=40
end
pbPlayCry(pokemon)
pbDisplay(_INTL("{1} transformed!",pokemon.name))
return true
else return false
end
elsif command==1
if pokemon.hasHiddenAbility?
newabil=(PBAbilities::AURABREAK)
newabilname=PBAbilities.getName(:AURABREAK)
if scene.pbConfirm(_INTL("Would you like to change {1}'s Ability to {2}?",
pokemon.name,newabilname))
pokemon.setAbility(newabil)
scene.pbRefresh
scene.pbDisplay(_INTL("{1}'s Ability changed to {2}!",pokemon.name,
PBAbilities.getName(pokemon.ability)))
@data[26]+=50
return true
else return false
end
else
newabil=(PBAbilities::POWERCONSTRUCT)
newabilname=PBAbilities.getName(:POWERCONSTRUCT)
if @data[26] >= 50
if scene.pbConfirm(_INTL("Would you like to change {1}'s Ability to {2}?",
pokemon.name,newabilname))
pokemon.setAbility(newabil)
scene.pbRefresh
scene.pbDisplay(_INTL("{1}'s Ability changed to {2}!",pokemon.name,
PBAbilities.getName(pokemon.ability)))
@data[26]-=50
return true
else return false
end
else scene.pbDisplay(_INTL("Not enough Cells."))
return false
end
end
elsif command == 2
if scene.pbConfirm(_INTL("Are you sure you want to deconstruct this Pok?mon?"))
if pokemon.hasHiddenAbility?
@data[26]+=100
else
@data[26]+=50
end
@party[pkmnid]=nil
@party.compact!
pbHardRefresh
pbDisplay(_INTL("Zygarde reverted to its Cells."))
return true
else return false
end
else
return false
end
elsif isConst?(pokemon.species,PBSpecies,:ZYGARDE10)
commands=[_INTL("Change Forme"),_INTL("Change Ability"),_INTL("Deconstruct"),_INTL("Cancel")]
command=scene.pbShowCommands(_INTL("Do what with {1}?",pokemon.name),commands)
if command==0
if (@data[26]>=40 && !pokemon.hasHiddenAbility?) || pokemon.hasHiddenAbility?
if scene.pbConfirm(_INTL("Change Zygarde to its 50% Forme?"))
pokemon.species = 718
if !pokemon.hasHiddenAbility?
@data[26]-=40
end
pbPlayCry(pokemon)
pbDisplay(_INTL("{1} transformed!",pokemon.name))
return true
else return false
end
elsif command==1
if pokemon.hasHiddenAbility?
newabil=(PBAbilities::AURABREAK)
newabilname=PBAbilities.getName(:AURABREAK)
if scene.pbConfirm(_INTL("Would you like to change {1}'s Ability to {2}?",
pokemon.name,newabilname))
pokemon.setAbility(newabil)
scene.pbRefresh
scene.pbDisplay(_INTL("{1}'s Ability changed to {2}!",pokemon.name,
PBAbilities.getName(pokemon.ability)))
@data[26]+=90
return true
else return false
end
else
newabil=(PBAbilities::POWERCONSTRUCT)
newabilname=PBAbilities.getName(:POWERCONSTRUCT)
if @data[26] >= 90
if scene.pbConfirm(_INTL("Would you like to change {1}'s Ability to {2}?",
pokemon.name,newabilname))
pokemon.setAbility(newabil)
scene.pbRefresh
scene.pbDisplay(_INTL("{1}'s Ability changed to {2}!",pokemon.name,
PBAbilities.getName(pokemon.ability)))
@data[26]-=90
return true
else return false
end
else scene.pbDisplay(_INTL("Not enough Cells."))
return false
end
end
elsif command == 2
if scene.pbConfirm(_INTL("Are you sure you want to deconstruct this Pok?mon?"))
if pokemon.hasHiddenAbility?
@data[26]+=100
else
@data[26]+=10
end
@party[pkmnid]=nil
@party.compact!
pbHardRefresh
pbDisplay(_INTL("Zygarde reverted to its Cells."))
return true
else return false
end
else
return false
end
else scene.pbDisplay(_INTL("There wasn't any effect."))
return false
end
end
commands=[_INTL("Change Forme"),_INTL("Change Ability"),_INTL("Deconstruct"),_INTL("Cancel")]
command=scene.pbShowCommands(_INTL("Do what with {1}?",pokemon.name),commands)
if command==0
if scene.pbConfirm(_INTL("Change Zygarde to its 10% Forme?"))
pokemon.species = 803
if !pokemon.hasHiddenAbility?
@data[26]+=40
end
pbPlayCry(pokemon)
pbDisplay(_INTL("{1} transformed!",pokemon.name))
return true
else return false
end
elsif command==1
if pokemon.hasHiddenAbility?
newabil=(PBAbilities::AURABREAK)
newabilname=PBAbilities.getName(:AURABREAK)
if scene.pbConfirm(_INTL("Would you like to change {1}'s Ability to {2}?",
pokemon.name,newabilname))
pokemon.setAbility(newabil)
scene.pbRefresh
scene.pbDisplay(_INTL("{1}'s Ability changed to {2}!",pokemon.name,
PBAbilities.getName(pokemon.ability)))
@data[26]+=50
return true
else return false
end
else
newabil=(PBAbilities::POWERCONSTRUCT)
newabilname=PBAbilities.getName(:POWERCONSTRUCT)
if @data[26] >= 50
if scene.pbConfirm(_INTL("Would you like to change {1}'s Ability to {2}?",
pokemon.name,newabilname))
pokemon.setAbility(newabil)
scene.pbRefresh
scene.pbDisplay(_INTL("{1}'s Ability changed to {2}!",pokemon.name,
PBAbilities.getName(pokemon.ability)))
@data[26]-=50
return true
else return false
end
else scene.pbDisplay(_INTL("Not enough Cells."))
return false
end
end
elsif command == 2
if scene.pbConfirm(_INTL("Are you sure you want to deconstruct this Pok?mon?"))
if pokemon.hasHiddenAbility?
@data[26]+=100
else
@data[26]+=50
end
@party[pkmnid]=nil
@party.compact!
pbHardRefresh
pbDisplay(_INTL("Zygarde reverted to its Cells."))
return true
else return false
end
else
return false
end
elsif isConst?(pokemon.species,PBSpecies,:ZYGARDE10)
commands=[_INTL("Change Forme"),_INTL("Change Ability"),_INTL("Deconstruct"),_INTL("Cancel")]
command=scene.pbShowCommands(_INTL("Do what with {1}?",pokemon.name),commands)
if command==0
if (@data[26]>=40 && !pokemon.hasHiddenAbility?) || pokemon.hasHiddenAbility?
if scene.pbConfirm(_INTL("Change Zygarde to its 50% Forme?"))
pokemon.species = 718
if !pokemon.hasHiddenAbility?
@data[26]-=40
end
pbPlayCry(pokemon)
pbDisplay(_INTL("{1} transformed!",pokemon.name))
return true
else return false
end
elsif command==1
if pokemon.hasHiddenAbility?
newabil=(PBAbilities::AURABREAK)
newabilname=PBAbilities.getName(:AURABREAK)
if scene.pbConfirm(_INTL("Would you like to change {1}'s Ability to {2}?",
pokemon.name,newabilname))
pokemon.setAbility(newabil)
scene.pbRefresh
scene.pbDisplay(_INTL("{1}'s Ability changed to {2}!",pokemon.name,
PBAbilities.getName(pokemon.ability)))
@data[26]+=90
return true
else return false
end
else
newabil=(PBAbilities::POWERCONSTRUCT)
newabilname=PBAbilities.getName(:POWERCONSTRUCT)
if @data[26] >= 90
if scene.pbConfirm(_INTL("Would you like to change {1}'s Ability to {2}?",
pokemon.name,newabilname))
pokemon.setAbility(newabil)
scene.pbRefresh
scene.pbDisplay(_INTL("{1}'s Ability changed to {2}!",pokemon.name,
PBAbilities.getName(pokemon.ability)))
@data[26]-=90
return true
else return false
end
else scene.pbDisplay(_INTL("Not enough Cells."))
return false
end
end
elsif command == 2
if scene.pbConfirm(_INTL("Are you sure you want to deconstruct this Pok?mon?"))
if pokemon.hasHiddenAbility?
@data[26]+=100
else
@data[26]+=10
end
@party[pkmnid]=nil
@party.compact!
pbHardRefresh
pbDisplay(_INTL("Zygarde reverted to its Cells."))
return true
else return false
end
else
return false
end
else scene.pbDisplay(_INTL("There wasn't any effect."))
return false
end
end
This is my code for a Zygarde Cube, in which the move tutoring feature is omitted.
What the system doesn't like is my use of scene.pbCommands.
What should I do to allow the "commands" call to work correctly?