The PokéCommunity Forums Fan Games Game Development Pokémon Essentials
Shields down Code?

Pokémon Essentials All questions and discussion about Pokémon Essentials, the Pokémon game kit for RPG Maker XP, go in here. Also contains links to the latest downloads and the Essentials Wiki.

Reply
 
Thread Tools
  #1    
Old September 24th, 2018 (1:34 PM). Edited September 24th, 2018 by Commiku.
Commiku Commiku is offline
     
    Join Date: Sep 2018
    Posts: 8
    I'm trying to implement shields down, the signature ability of minior, but for some reason it simply doesnt trigger.
    Code:

    in BP battler under darmatian's zen mode
    Quote:
    # Shieldsdown
    if self.hasWorkingAbility(:SHIELDSDOWN) && !self.isFainted?
    if @hp<=((@totalhp/2).floor) && self.form!=0
    @battle.pbDisplayEffect(self)
    self.form!=rand(4)
    @battle.pbDisplay(_INTL("{1} activated",PBAbilities.getName(@ability)))
    end
    if @hp>=((@totalhp/2).floor) && self.form!=0
    case self.status
    when PBStatuses::SLEEP
    if self.hasWorkingAbility(:SHIELDSDOWN)
    PBDebug.log("[Ability triggered] #{pbThis}'s #{PBAbilities.getName(@ability)}")
    pbCureStatus(false)
    @battle.pbDisplay(_INTL("{1}'s {2} woke it up!",pbThis,PBAbilities.getName(@ability)))
    end
    when PBStatuses::POISON
    if self.hasWorkingAbility(:SHIELDSDOWN)
    PBDebug.log("[Ability triggered] #{pbThis}'s #{PBAbilities.getName(@ability)}")
    pbCureStatus(false)
    @battle.pbDisplay(_INTL("{1}'s {2} cured its poisoning!",pbThis,PBAbilities.getName(@ability)))
    end
    when PBStatuses::BURN
    if self.hasWorkingAbility(:SHIELDSDOWN)
    PBDebug.log("[Ability triggered] #{pbThis}'s #{PBAbilities.getName(@ability)}")
    pbCureStatus(false)
    @battle.pbDisplay(_INTL("{1}'s {2} healed its burn!",pbThis,PBAbilities.getName(@ability)))
    end
    when PBStatuses::PARALYSIS
    if self.hasWorkingAbility(:SHIELDSDOWN)
    PBDebug.log("[Ability triggered] #{pbThis}'s #{PBAbilities.getName(@ability)}")
    pbCureStatus(false)
    @battle.pbDisplay(_INTL("{1}'s {2} cured its paralysis!",pbThis,PBAbilities.getName(@ability)))
    end
    when PBStatuses::FROZEN
    if self.hasWorkingAbility(:SHIELDSDOWN)
    PBDebug.log("[Ability triggered] #{pbThis}'s #{PBAbilities.getName(@ability)}")
    pbCureStatus(false)
    @battle.pbDisplay(_INTL("{1}'s {2} defrosted it!",pbThis,PBAbilities.getName(@ability)))
    end
    end
    end
    end
    pbs files for forms

    #-----------------------------
    [MINIOR-1]
    FormName=CORE1
    BaseStats=60,100,60,100,60,120
    #-----------------------------
    [MINIOR-2]
    FormName=CORE2
    BaseStats=60,100,60,100,60,120
    #-----------------------------
    [MINIOR-3]
    FormName=CORE3
    BaseStats=60,100,60,100,60,120
    #-----------------------------
    [MINIOR-4]
    FormName=CORE4
    BaseStats=60,100,60,100,60,120

    thanks in advance
    Reply With Quote
      #2    
    Old September 24th, 2018 (5:11 PM). Edited September 24th, 2018 by WolfPP.
    WolfPP's Avatar
    WolfPP WolfPP is online now
       
      Join Date: Aug 2018
      Location: Brazil
      Gender: Male
      Nature: Jolly
      Posts: 144
      hmmm try this:

      Spoiler:
      Code:
          # Minior
          if self.hasWorkingAbility(:SHIELDSDOWN) && isConst?(self.species,PBSpecies,:MINIOR)
            if self.form==0 && @hp<=((@totalhp/2).floor)
              self.form=rand(7); transformed=true
            elsif self.form!=0 && @hp>=((@totalhp/2).floor)
              self.form=0; transformed=true
            end
            if self.form==0
              user=self
              case self.status
              when PBStatuses::SLEEP
                pbCureStatus(false)
                @battle.pbDisplay(_INTL("{1} woke up!",pbThis))
              when PBStatuses::POISON
                pbCureStatus(false)
                @battle.pbDisplay(_INTL("{1} can't be poisoned!",pbThis))
              when PBStatuses::BURN
                pbCureStatus(false)
                @battle.pbDisplay(_INTL("{1} can't be burned!",pbThis))
              when PBStatuses::FROZEN
                pbCureStatus(false)
                @battle.pbDisplay(_INTL("{1} can't be frozen!",pbThis))
              when PBStatuses::PARALYSIS
                pbCureStatus(false)
                @battle.pbDisplay(_INTL("{1} can't be paralyzed!",pbThis))
              end
            end
          end
      and i miss 'transformed=true' in your script.
      Reply With Quote
        #3    
      Old September 25th, 2018 (1:47 PM).
      Commiku Commiku is offline
         
        Join Date: Sep 2018
        Posts: 8
        Quote:
        Originally Posted by WolfPP View Post
        hmmm try this:

        Spoiler:
        Code:
            # Minior
            if self.hasWorkingAbility(:SHIELDSDOWN) && isConst?(self.species,PBSpecies,:MINIOR)
              if self.form==0 && @hp<=((@totalhp/2).floor)
                self.form=rand(7); transformed=true
              elsif self.form!=0 && @hp>=((@totalhp/2).floor)
                self.form=0; transformed=true
              end
              if self.form==0
                user=self
                case self.status
                when PBStatuses::SLEEP
                  pbCureStatus(false)
                  @battle.pbDisplay(_INTL("{1} woke up!",pbThis))
                when PBStatuses::POISON
                  pbCureStatus(false)
                  @battle.pbDisplay(_INTL("{1} can't be poisoned!",pbThis))
                when PBStatuses::BURN
                  pbCureStatus(false)
                  @battle.pbDisplay(_INTL("{1} can't be burned!",pbThis))
                when PBStatuses::FROZEN
                  pbCureStatus(false)
                  @battle.pbDisplay(_INTL("{1} can't be frozen!",pbThis))
                when PBStatuses::PARALYSIS
                  pbCureStatus(false)
                  @battle.pbDisplay(_INTL("{1} can't be paralyzed!",pbThis))
                end
              end
            end
        and i miss 'transformed=true' in your script.
        This solved my problem. thanks!
        Reply With Quote
        Reply

        Quick Reply

        Join the conversation!

        Create an account to post a reply in this thread, participate in other discussions, and more!

        Create a PokéCommunity Account
        Thread Tools

        Posting Rules
        You may not post new threads
        You may not post replies
        You may not post attachments
        You may not edit your posts

        BB code is On
        Smilies are On
        [IMG] code is On
        HTML code is Off

        Forum Jump


        All times are GMT -8. The time now is 12:27 PM.