• 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!
  • 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.

[Scripting Question] When Necrozma is fused

WolfPP

Spriter/ Pixel Artist
  • 1,308
    Posts
    6
    Years
    Sup guys!

    So, when Necrozma is fused, it tries to learn a new move in the same way that other Pokémon may learn new moves upon evolving. If Necrozma changes to its normal form, it immediately forgets the special move of the form it was in (if it still knows it); if the only move that Necrozma knows is the form's special move, then that move will be replaced with Confusion.

    How can i put this like script?

    When we fuse necrozma with Lunala, it will learn Moongeist Beam and when separate them, Necrozma will forget Moongeist Beam and learn Confusion;
    When we fuse necrozma with Solgaleo, it will learn Sun Steel Strike and when separate them, Necrozma will forget Sun Steel Strike and learn Confusion.

    Ty ty!

    I have the n-solarizer and n-lunarizer script (maybe add here):
    NEW SCRIPT (Now when you have to separate Necrozma, you can use only N-Solarizer, to Solgaleo, and only N-Lunarizer to Lunala)
    Thanks mybusiness to see that.

    Spoiler:



    OLD SCRIPT
    Spoiler:
     
    Last edited:
    Maybe you can look at how this works for the Rotom forms and their special moves?
     
    Maybe you can look at how this works for the Rotom forms and their special moves?

    You always savin me! Thanks a lot!

    in 'Pokemon_Forms' before 'MultipleForms.register(:GIRATINA,{' add:

    Spoiler:

    Then, in 'PSystem_PokemonUtilities' add above 'def pbCheckMove(move)':
    Spoiler:
     
    Last edited:
    You always savin me! Thanks a lot!

    Awesome! Glad it worked for you.

    Also I want to say thank you for always posting your solutions here, and for helping others with their problems! It's very appreciated :)
     
    There is a problem. When you have to separate Necrozma, you can use, either N-Solarizer, either N-Lunarizer, and shouldn´t. Per example, if you have Dusk Mane, you should be able to separate them only with a N-Solarizer, not N-Lunarizer also. Do you know how to fix this?
     
    Last edited:
    There is a problem. When you have to separate Necrozma, you can use, either N-Solarizer, either N-Lunarizer, and shouldn´t. Per example, if you have Dusk Mane, you should be able to separate them only with a N-Solarizer, not N-Lunarizer also. Do you know how to fix this?

    Ok. Here is our problem:

    Code:
    ItemHandlers::UseOnPokemon.add(:NSOLARIZER,proc{|item,pokemon,scene|
    [COLOR="Red"]   if isConst?(pokemon.species,PBSpecies,:NECROZMA) && pokemon.hp>=0[/COLOR]
         if pokemon.fused!=nil
           if $Trainer.party.length>=6
             scene.pbDisplay(_INTL("Your party is full! You can't unfuse {1}.",pokemon.name))
             next false
           else
             $Trainer.party[$Trainer.party.length]=pokemon.fused
             pokemon.fused=nil
             pokemon.form=0
             scene.pbHardRefresh
             scene.pbDisplay(_INTL("{1} changed Forme!",pokemon.name))
             next true
           end

    We need put '&& pokemon.form=1' or something like that. Also, to Lunarizer, form=2.

    EDIT: DONE!

    To 'NLUNARIZER', replace:
    Spoiler:


    To 'NSOLARIZER', replace:
    Spoiler:


    Also, to 'Pokemon_Form', replace what i wrote in 'onSetForm':
    Spoiler:

    Att first post.
     
    Last edited:
    It still has few bugs. I tried combining multiple Necrozma´s, Solgaleos and Lunala´s, and they can be multiplied with some method. Another thing is that Confusion is learned by normal Necrozma only if it forgets any move upon changing form, not at any time. Now, this is completely void of bugs, I guarantee:

    In PBItems_ItemEffects, add:
    Spoiler:

    In Pokemon_Forms, add:
    Spoiler:
     
    It still has few bugs. I tried combining multiple Necrozma´s, Solgaleos and Lunala´s, and they can be multiplied with some method. Another thing is that Confusion is learned by normal Necrozma only if it forgets any move upon changing form, not at any time. Now, this is completely void of bugs, I guarantee:

    In PBItems_ItemEffects, add:
    Spoiler:

    In Pokemon_Forms, add:
    Spoiler:

    After fusion, if Solgeleo or Lunala holds a item, we "lost" that item, but, when separate them, the hold item turns back to Solgaleo or Lunala.
    How can we put a def to Take Necrozma/Solgaleo/Lunala hold item?
    Code:
    if pokemon.hasholditem?
    back to bag
    end

    or
    Code:
    $PokemonBag.pbStoreItem(pokemon.item) if !pokemon.hasItem?

    Code:
                 pbTakeItemFromPokemon(pokemon,self)
                 pbRefreshSingle(pkmnid)
    ?


    Thanks!
     
    Last edited:
    Code:
    def pbHasHeldItem?(poke)
    return true if poke.item
    return false
    end

    You also will want to use
    Code:
    pbTakeItemFromPokemon(pokemon,scene)
     
    Code:
    def pbHasHeldItem?(poke)
    return true if poke.item
    return false
    end

    You also will want to use
    Code:
    pbTakeItemFromPokemon(pokemon,scene)

    like that?
    Code:
             chosen=scene.pbChoosePokemon(_INTL("Which Pokémon do you want to use?"))
             if chosen>=0
               poke2=$Trainer.party[chosen]
               if isConst?(poke2.species,PBSpecies,:LUNALA) && poke2.hp>0 && !poke2.egg?
                 nform=1 if isConst?(poke2.species,PBSpecies,:LUNALA)
    [COLOR="Red"]             if poke2.pbHasHeldItem?(poke)
                   pbTakeItemFromPokemon(poke,self) 
                 end   [/COLOR]        
                 
                 pokemon.form=2
                 pokemon.fused=poke2
                 pbRemovePokemonAt(chosen)
                 scene.pbHardRefresh
                 scene.pbDisplay(_INTL("{1} transformed!",pokemon.name))

    I put Inside 'PItem_Items' above 'def pbGiveItemToPokemon(item,pokemon,scene,pkmnid=0)'
    Code:
    def pbHasHeldItem?(poke)
    return true if poke.item
    return false
    end

    Thats correct? Unfortanely give me error.
     
    Last edited:
    Hmmm. Ok, delete all I said. Put this in PokeBattle_Pokemon, in the section # Items
    Code:
    def hasSomeItem?
    return true if self.item
    return false
    end

    Now, your red code should be replaced by:
    Code:
    if poke2.pbHasHeldItem?
                   pbTakeItemFromPokemon(poke2,XXX) 
                 end

    That XXX has to be a scene class. I don't have experience with those, yet. Sorry.
     
    Hmmm. Ok, delete all I said. Put this in PokeBattle_Pokemon, in the section # Items
    Code:
    def hasSomeItem?
    return true if self.item
    return false
    end

    Now, your red code should be replaced by:
    Code:
    if poke2.pbHasHeldItem?
                   pbTakeItemFromPokemon(poke2,XXX) 
                 end

    That XXX has to be a scene class. I don't have experience with those, yet. Sorry.

    Hm, unfortanely, doenst works too.

    Im tryin usin something like this:
    Code:
               if isConst?(poke2.species,PBSpecies,:SOLGALEO) && poke2.hp>0 && !poke2.egg?
                 if poke2.hasItem?
                   $PokemonBag.pbStoreItem(pokemon.item)
                   pokemon.setItem(0)
                   ret = true
                   return ret
                 end
                 form=1 if isConst?(poke2.species,PBSpecies,:SOLGALEO)
                 
                 pokemon.form=1
                 pokemon.fused=poke2
                 
                 pbRemovePokemonAt(chosen)
                 scene.pbHardRefresh
                 scene.pbDisplay(_INTL("{1} transformed!",pokemon.name))
    Anyway, when i find a solution, i will post :D

    EDIT: DONE!
    Spoiler:
     
    Last edited:
    Back
    Top