• 5359 views
  • 17 replies

StCooler

Mayst thou thy peace discover.

Online now
Posted 7 Hours Ago
5,672 posts
2.3 Years
Pokémon Legends Arceus content
Gen 8 project for V18
Hi all,

I added some content of Pokémon Legends: Arceus to my game, so I thought I would share the code.
This add-on implements the code for Drowsy / Frostbite (the new statuses), as well as the new moves, new forms and new Pokémons.

First warnings:
Second warnings:
  • I wasn't planning to release this script, so I had to "extract" my edits for you. I may have forgotten some parts. If you feel something is missing and/or something doesn't work as expected, let me know ^^
  • I haven't played (and don't plan to play) to Pokémon Legends: Arceus, so maybe my messages for drowsiness/frostbite are not correct. Please tell me the right messages if you want.
  • Some edits are not "official". I don't like moves that increase evasion so I ignored this boost. Also, I considered that every move that thaws the user, also removes its frostbite. And Electric moves all remove drowsiness. You can comment the corresponding code if you don't like it.
  • This plugin is almost purely about scripting. For the sprites of the new Pokémons/forms, please follow this thread on Smogon.
  • The new moves + the new common animations for statuses are now on the todo-list for my animation project.

There is a script edit part. As always, be careful with it, make backups before anything.

Part 1 - PBS additions
Add the following data to the corresponding PBS file:
  • pokemon.txt
    Version 1: only the new Pokémons with their official movesets.
    Version 2: only the new Pokémons, with extended movesets (I tried to give more moves to the Pokémons).
    Version 3: all new data in Pokémon Legends: Arceus. You have to edit the PBS yourself.
  • pokemonforms.txt
    Version 1: only the new forms with their official movesets.
    Version 2: only the new forms, with extended movesets (I tried to give more moves to the Pokémons).
    Version 3: all new data in Pokémon Legends: Arceus. You have to edit the PBS yourself.
  • moves.txt
    Strong Style. Be careful with the ids of the moves. Note: all moves are in Strong Style.
    My own balance. Most moves are in Standard style, and some moves are in Strong Style (Raging Fury, Wave Crash, Chloroblast, Headlong Rush, maybe I'm missing some). This is an attempt at balancing the new moves, most of them are too powerful compared to the existing ones.

For pokemon.txt and pokemonforms.txt, if you don't know what to do, use Version 2 of both. These files give a larger moveset to each Pokémon.
Also, the tutor moves are added as a "TutorMoves" list. You should add them to the tm.txt file. Yes, this is tedious.

Part 2 - Status graphics
Download the attached ZIP file and merge the Graphics folder with your Graphics folder, and replace the files.

Part 3 - New script
Install this script, above Main, and below ZUD and Following Pokémon, if you use any of them.
https://pastebin.com/7qCtWZLj

Part 4 - Script edits.
Ow lawd, they coming.

Step 1 is, as always: make a backup!

Spoiler:

In the file PBStatuses:
Spoiler:

Below the line:
    FROZEN    = 5
add the line:
    FROSTBITE = 6 # Pokémon Legends: Arceus
    DROWSY    = 7 # Pokémon Legends: Arceus
And in the function
    def self.getName(id)
replace the line:
        _INTL("frozen")
with the lines:
        _INTL("frozen"),
        _INTL("frostbitten"), # Pokémon Legends: Arceus
        _INTL("drowsy") # Pokémon Legends: Arceus


In the file Battle_Statuses:
Spoiler:

In the function
  def pbCanInflictStatus?(newStatus,user,showMessages,move=nil,ignoreStatus=false)
Below the line:
        when PBStatuses::FROZEN;    msg = _INTL("{1} is already frozen solid!",pbThis)
paste this line:
        when PBStatuses::FROSTBITE; msg = _INTL("{1} is already frostbitten!",pbThis)
        when PBStatuses::DROWSY;    msg = _INTL("{1} is already drowsy!",pbThis)
Below the lines:
    when PBStatuses::FROZEN
      hasImmuneType |= pbHasType?(:ICE)
paste these lines:
    when PBStatuses::FROSTBITE
      hasImmuneType |= pbHasType?(:ICE)
      hasImmuneType |= pbHasType?(:FIRE)
Below the line:
          when PBStatuses::FROZEN;    msg = _INTL("{1} cannot be frozen solid!",pbThis)
paste this line:
          when PBStatuses::FROSTBITE; msg = _INTL("{1} cannot be frostbitten!",pbThis)
          when PBStatuses::DROWSY;    msg = _INTL("{1} resists drowsiness!",pbThis)
Below the lines:
          when PBStatuses::FROZEN
            msg = _INTL("{1} cannot be frozen solid because of {2}'s {3}!",
               pbThis,immAlly.pbThis(true),immAlly.abilityName)
paste these lines:
          when PBStatuses::FROSTBITE
            msg = _INTL("{1} cannot be frostbitten because of {2}'s {3}!",
               pbThis,immAlly.pbThis(true),immAlly.abilityName)
          when PBStatuses::DROWSY
            msg = _INTL("{1} resists drowsiness because of {2}'s {3}!",
               pbThis,immAlly.pbThis(true),immAlly.abilityName)
Below the line:
          when PBStatuses::FROZEN;    msg = _INTL("{1}'s {2} prevents freezing!",pbThis,abilityName)
paste this line:
          when PBStatuses::FROSTBITE; msg = _INTL("{1}'s {2} prevents frostbites!",pbThis,abilityName)
          when PBStatuses::DROWSY;    msg = _INTL("{1}'s {2} prevents drowsiness!",pbThis,abilityName)
In the function
  def pbCanSynchronizeStatus?(newStatus,target)
Belows the lines:
    when PBStatuses::FROZEN
      hasImmuneType |= pbHasType?(:ICE)
paste these lines:
    when PBStatuses::FROSTBITE
      hasImmuneType |= pbHasType?(:ICE)
      hasImmuneType |= pbHasType?(:FIRE)
In the function:
  def pbInflictStatus(newStatus,newStatusCount=0,msg=nil,user=nil)
Below the lines:
    when PBStatuses::FROZEN
      @battle.pbCommonAnimation("Frozen",self)
      msg = _INTL("{1} was frozen solid!",pbThis) if !msg || msg==""
paste these lines:
    when PBStatuses::FROSTBITE
      @battle.pbCommonAnimation("Frostbitten",self)
      msg = _INTL("{1} was frostbitten!",pbThis) if !msg || msg==""
    when PBStatuses::DROWSY
      @battle.pbCommonAnimation("Drowsy",self)
      msg = _INTL("{1} is drowsy!",pbThis) if !msg || msg==""
In the function:
  def pbContinueStatus
Below the lines:
    when PBStatuses::FROZEN
      anim = "Frozen";    msg = _INTL("{1} is frozen solid!",pbThis)
paste this:
    when PBStatuses::FROSTBITE
      anim = "Frostbitten"; msg = _INTL("{1} was hurt by its frostbite!",pbThis)
    when PBStatuses::DROWSY
      anim = "Drowsy"; msg = _INTL("{1} is drowsy.",pbThis)
In the function:
  def pbCureStatus(showMessages=true)
Below the line:
      when PBStatuses::FROZEN;    @battle.pbDisplay(_INTL("{1} thawed out!",pbThis))
Paste these lines:
      when PBStatuses::FROSTBITE; @battle.pbDisplay(_INTL("{1}'s frostbite was healed!",pbThis))
      when PBStatuses::DROWSY;    @battle.pbDisplay(_INTL("{1} is no longer drowsy!",pbThis))


In the file Battler_UseMove:
Spoiler:

In the function:
  def pbUseMove(choice,specialUsage=false)
find this piece of code:
    # Self-thawing due to the move
    if user.status==PBStatuses::FROZEN && move.thawsUser?
      user.pbCureStatus(false)
      @battle.pbDisplay(_INTL("{1} melted the ice!",user.pbThis))
    end
and paste this above:
    # Pokémon Legends Arceus: Cures Drowsy.
    if user.status==PBStatuses::DROWSY && move.undrowsesUser?
      user.pbCureStatus(false)
      @battle.pbDisplay(_INTL("{1} is longer drowsy!",user.pbThis))
    end
    # Pokémon Legends Arceus: Cures Frostbite.
    if user.status==PBStatuses::FROSTBITE && move.thawsUser?
      user.pbCureStatus(false)
      @battle.pbDisplay(_INTL("{1} cures its frostbite!",user.pbThis))
    end



In the file Battler_UseMove_SuccessChecks:
Spoiler:

Below the following code:
    # Paralysis
    if @status==PBStatuses::PARALYSIS
      if @battle.pbRandom(100)<25
        pbContinueStatus
        @lastMoveFailed = true
        return false
      end
    end
paste this code:
    # Drowsy
    if @status==PBStatuses::DROWSY
      if @battle.pbRandom(100)<25
        pbContinueStatus
        @lastMoveFailed = true
        return false
      end
    end


In the file Move_Usage_Calculations:
Spoiler:

Below the follow code:
    # Burn
    if user.status==PBStatuses::BURN && physicalMove? && damageReducedByBurn? &&
       !user.hasActiveAbility?(:GUTS)
      multipliers[FINAL_DMG_MULT] /= 2
    end
paste this:
    # Frostbite (Pokémon Legends: Arceus)
    if user.status==PBStatuses::FROSTBITE && specialMove? && damageReducedByFrostbite? &&
       !user.hasActiveAbility?(:GUTS)
      multipliers[FINAL_DMG_MULT] /= 2
    end
    # Drowsy (Pokémon Legends: Arceus)
    if target.status==PBStatuses::DROWSY
      multipliers[FINAL_DMG_MULT] /= 1.25 # I don't know the exact value.
    end
Below the following code:
    if @battle.pbWeather == PBWeather::Sandstorm
      if target.pbHasType?(:ROCK) && specialMove? && @function!="122"   # Psyshock
        multipliers[DEF_MULT] *= 1.5
      end
    end
paste this:
    # Pokémon Legends: Arceus
    if user.effects[PBEffects::VictoryDance]
      multipliers[FINAL_DMG_MULT] *= 1.5 
    end


In the file Battle_Phase_EndOfRound:
Spoiler:

Below this piece of code:
    # Damage from burn
    priority.each do |b|
      next if b.status!=PBStatuses::BURN || !b.takesIndirectDamage?
      oldHP = b.hp
      dmg = (NEWEST_BATTLE_MECHANICS) ? b.totalhp/16 : b.totalhp/8
      dmg = (dmg/2.0).round if b.hasActiveAbility?(:HEATPROOF)
      b.pbContinueStatus { b.pbReduceHP(dmg,false) }
      b.pbItemHPHealCheck
      b.pbAbilitiesOnDamageTaken(oldHP)
      b.pbFaint if b.fainted?
    end
paste this:
    # Damage from frostbite (Pokémon Legends: Arceus)
    priority.each do |b|
      next if b.status!=PBStatuses::FROSTBITE || !b.takesIndirectDamage?
      oldHP = b.hp
      dmg = (NEWEST_BATTLE_MECHANICS) ? b.totalhp/16 : b.totalhp/8
      dmg = (dmg/2.0).round if b.hasActiveAbility?(:MAGMAARMOR)
      b.pbContinueStatus { b.pbReduceHP(dmg,false) }
      b.pbItemHPHealCheck
      b.pbAbilitiesOnDamageTaken(oldHP)
      b.pbFaint if b.fainted?
    end
Above the comment:
    # Damage from Hyper Mode (Shadow Pokémon)
paste this code:
    # Pokémon Legends: Arceus
    # Stone Axe Splinters
    priority.each do |b|
      b.effects[PBEffects::StoneAxe] -= 1
      next if b.effects[PBEffects::StoneAxe] < 0
      next if !b.takesIndirectDamage?
      pbCommonAnimation("StoneAxe",b)
      oldHP = b.hp
      b.pbReduceHP(b.totalhp/8)
      pbDisplay(_INTL("The stone axe splinters hurt {1}!",b.pbThis(true)))
      b.pbItemHPHealCheck
      b.pbAbilitiesOnDamageTaken(oldHP)
      b.pbFaint if b.fainted?
    end
    # Ceaseless Edge Splinters
    priority.each do |b|
      b.effects[PBEffects::CeaselessEdge] -= 1
      next if b.effects[PBEffects::CeaselessEdge] < 0
      next if !b.takesIndirectDamage?
      pbCommonAnimation("CeaselessEdge",b)
      oldHP = b.hp
      b.pbReduceHP(b.totalhp/8)
      pbDisplay(_INTL("The ceaseless edge splinters hurt {1}!",b.pbThis(true)))
      b.pbItemHPHealCheck
      b.pbAbilitiesOnDamageTaken(oldHP)
      b.pbFaint if b.fainted?
    end


In the file AI_Move_EffectScores:
Spoiler:

Find the code for:
    when "018"
In this part, replace the line:
      when PBStatuses::BURN, PBStatuses::PARALYSIS, PBStatuses::FROSTBITE
with the line:
      when PBStatuses::BURN, PBStatuses::PARALYSIS, PBStatuses::FROSTBITE, PBStatuses::DROWSY
Similarly, find the code for:
    when "07D"
and replace:
      score -= 20 if target.status==PBStatuses::SLEEP &&   # Will cure status
                     target.statusCount>1
with:
      score -= 20 if (target.status==PBStatuses::SLEEP || 
                      target.status==PBStatuses::DROWSY) &&   # Will cure status
                     target.statusCount>1
Find the code for:
    when "110"
and below:
        score += 80 if user.pbOwnSide.effects[PBEffects::StealthRock]
paste this:
        score += 80 if user.pbOwnSide.effects[PBEffects::StoneAxe] > -1
        score += 80 if user.pbOwnSide.effects[PBEffects::CeaselessEdge] > -1
Find the code for:
    when "15A"
and replace:
      if target.opposes?(user)
        score -= 40 if target.status==PBStatuses::BURN
      else
        score += 40 if target.status==PBStatuses::BURN
      end
with
      if target.opposes?(user)
        score -= 40 if target.status==PBStatuses::BURN || target.status==PBStatuses::FROSTBITE
      else
        score += 40 if target.status==PBStatuses::BURN || target.status==PBStatuses::FROSTBITE
      end
If you use the Gen 8 project for v18.1 (which I do), the last line in the AI should be:
    #---------------------------------------------------------------------------
    when "198" # Eerie Spell
      score -= 40
Below that, paste the following piece of code:
    #---------------------------------------------------------------------------
    when "200" # Dire Claw
      score += 30 if target.status==PBStatuses::NONE
    #---------------------------------------------------------------------------
    when "201" # Power Shift
      if skill>=PBTrainerAI.mediumSkill
        aatk = pbRoughStat(user,PBStats::ATTACK,skill)
        adef = pbRoughStat(user,PBStats::DEFENSE,skill)
        asatk = pbRoughStat(user,PBStats::SPATK,skill)
        asdef = pbRoughStat(user,PBStats::SPDEF,skill)
        if (aatk==adef && asatk==asdef) ||
           user.effects[PBEffects::PowerShift]   # No flip-flopping
          score -= 90
        elsif adef>aatk || asdef>asatk  # Prefer a higher Attack
          score += 30
        else
          score -= 30
        end
      else
        score -= 30
      end
    #---------------------------------------------------------------------------
    when "202" # Stone Axe
      score += 60 if target.effects[PBEffects::StoneAxe] < 0
    #---------------------------------------------------------------------------
    when "203" # Ceaseless Edge
      score += 60 if target.effects[PBEffects::CeaselessEdge] < 0
    #---------------------------------------------------------------------------
    when "204" # Springtide Storm
      if move.statusMove?
        if user.statStageAtMax?(PBStats::DEFENSE)
          score -= 90
        else
          score += 40 if user.turnCount==0
          score -= user.stages[PBStats::DEFENSE]*20
        end
      else
        score += 10 if user.turnCount==0
        score += 20 if user.stages[PBStats::DEFENSE]<0
      end
    #---------------------------------------------------------------------------
    when "205" # Mystical Power
      if skill>=PBTrainerAI.mediumSkill
        aatk = pbRoughStat(user,PBStats::ATTACK,skill)
        adef = pbRoughStat(user,PBStats::DEFENSE,skill)
        asatk = pbRoughStat(user,PBStats::SPATK,skill)
        asdef = pbRoughStat(user,PBStats::SPDEF,skill)
        if aatk + asatk >= adef + asdef
          if user.statStageAtMax?(PBStats::ATTACK) && user.statStageAtMax?(PBStats::SPATK)
            score -= 90
          else
            score += 40 if user.turnCount==0
            score -= user.stages[PBStats::ATTACK]*20
            score -= user.stages[PBStats::SPATK]*20
          end
        else 
          if user.statStageAtMax?(PBStats::DEFENSE) && user.statStageAtMax?(PBStats::SPDEF)
            score -= 90
          else
            score += 40 if user.turnCount==0
            score -= user.stages[PBStats::DEFENSE]*20
            score -= user.stages[PBStats::SPDEF]*20
          end
        end 
      else
        score -= 30
      end
    #---------------------------------------------------------------------------
    when "206" # Wave Crash
      score -= 20
    #---------------------------------------------------------------------------
    when "207" # Chloroblast
      score -= 20
    #---------------------------------------------------------------------------
    when "208" # Victory Dance
      if skill>=PBTrainerAI.mediumSkill
        if user.statStageAtMax?(PBStats::DEFENSE) && user.statStageAtMax?(PBStats::SPDEF) &&
          user.statStageAtMax?(PBStats::ATTACK) && user.statStageAtMax?(PBStats::SPATK)
          score -= 90
        else
          score += 40 if user.turnCount==0 || !user.effects[PBEffects::VictoryDance]
          score -= user.stages[PBStats::DEFENSE]*10
          score -= user.stages[PBStats::SPDEF]*10
          score -= user.stages[PBStats::ATTACK]*10
          score -= user.stages[PBStats::SPATK]*10
        end
      else
        score -= 30
      end
    #---------------------------------------------------------------------------
    when "209" # Barb Barrage
      score += 30 if target.status != PBStatuses::NONE
    #---------------------------------------------------------------------------
    when "210" # Bitter Malice
      score += 30 if target.status != PBStatuses::NONE
    #---------------------------------------------------------------------------
    when "211" # Infernal Parade
      score += 30 if target.status != PBStatuses::NONE
    #---------------------------------------------------------------------------
    when "212" # Triple Arrows
      score += 30 if user.effects[PBEffects::FocusEnergy]<2
      score += user.stages[PBStats::DEFENSE]*10
    #---------------------------------------------------------------------------
    when "213" # Bleakwind Storm
      if target.pbCanFrostbite?(user,false)
        score += 30
        if skill>=PBTrainerAI.highSkill
          score -= 40 if target.hasActiveAbility?([:GUTS,:MARVELSCALE,:QUICKFEET])
        end
      else
        if skill>=PBTrainerAI.mediumSkill
          score -= 90 if move.statusMove?
        end
      end
    #---------------------------------------------------------------------------
    when "214" # Lunar Blessing
      if user.hp==user.totalhp || (skill>=PBTrainerAI.mediumSkill && !user.canHeal?)
        score -= 90
      else
        score += 50
        score -= user.hp*100/user.totalhp
      end
      case user.status
      when PBStatuses::POISON
        score += 40
        if skill>=PBTrainerAI.mediumSkill
          if user.hp<user.totalhp/8
            score += 60
          elsif skill>=PBTrainerAI.highSkill &&
             user.hp<(user.effects[PBEffects::Toxic]+1)*user.totalhp/16
            score += 60
          end
        end
      when PBStatuses::BURN, PBStatuses::PARALYSIS, PBStatuses::FROSTBITE, PBStatuses::DROWSY
        score += 40
      else
        score -= 90
      end
    #---------------------------------------------------------------------------
    when "215" # Take Heart
      if skill>=PBTrainerAI.mediumSkill
        if user.statStageAtMax?(PBStats::DEFENSE) && user.statStageAtMax?(PBStats::SPDEF) &&
          user.statStageAtMax?(PBStats::ATTACK) && user.statStageAtMax?(PBStats::SPATK)
          score -= 90
        else
          score += 40 if user.turnCount==0 
          score -= user.stages[PBStats::DEFENSE]*10
          score -= user.stages[PBStats::SPDEF]*10
          score -= user.stages[PBStats::ATTACK]*10
          score -= user.stages[PBStats::SPATK]*10
        end
      else
        score -= 30
      end
      case user.status
      when PBStatuses::POISON
        score += 40
        if skill>=PBTrainerAI.mediumSkill
          if user.hp<user.totalhp/8
            score += 60
          elsif skill>=PBTrainerAI.highSkill &&
             user.hp<(user.effects[PBEffects::Toxic]+1)*user.totalhp/16
            score += 60
          end
        end
      when PBStatuses::BURN, PBStatuses::PARALYSIS, PBStatuses::FROSTBITE, PBStatuses::DROWSY
        score += 40
      else
        score -= 90
      end


In the file AI_Move_Utilities:
Spoiler:

Find the code:
# Burn
if skill>=PBTrainerAI.highSkill
if user.status==PBStatuses::BURN && move.physicalMove?(type) &&
!user.hasActiveAbility?(:GUTS) &&
!(NEWEST_BATTLE_MECHANICS && move.function=="07E") # Facade
multipliers[FINAL_DMG_MULT] /= 2
end
end
and below it, paste this:
# Frostbite (Pokémon Legends: Arceus)
if skill>=PBTrainerAI.highSkill
if user.status==PBStatuses::FROSTBITE && move.specialMove?(type) &&
!user.hasActiveAbility?(:GUTS) &&
!(NEWEST_BATTLE_MECHANICS && move.function=="07E") # Facade
multipliers[FINAL_DMG_MULT] /= 2
end
end


In the file PokeBattle_BattlePalace:
Spoiler:

In the function:
  def pbEnemyShouldWithdraw?(idxBattler)
Find the code:
      case thispkmn.status
      when PBStatuses::SLEEP, PBStatuses::FROZEN
        factor += 20
      when PBStatuses::POISON, PBStatuses::BURN
        factor += 10
      when PBStatuses::PARALYSIS
        factor += 15
      end
and replace it with:
      case thispkmn.status
      when PBStatuses::SLEEP, PBStatuses::FROZEN
        factor += 20
      when PBStatuses::POISON, PBStatuses::BURN, PBStatuses::FROSTBITE
        factor += 10
      when PBStatuses::PARALYSIS, PBStatuses::DROWSY
        factor += 15
      end


In the file Debug_Pokemon:
Spoiler:

In the function
  def pbPokemonDebugActions(command,pkmn,pkmnid,heldpoke=nil,settingUpBattle=false)
find the code:
          cmd = pbShowCommands(_INTL("Set {1}'s status.",pkmn.name),[
             _INTL("[Cure]"),
             _INTL("Sleep"),
             _INTL("Poison"),
             _INTL("Burn"),
             _INTL("Paralysis"),
             _INTL("Frozen")
          ],cmd)
and replace it with:
          cmd = pbShowCommands(_INTL("Set {1}'s status.",pkmn.name),[
             _INTL("[Cure]"),
             _INTL("Sleep"),
             _INTL("Poison"),
             _INTL("Burn"),
             _INTL("Paralysis"),
             _INTL("Frozen"),
             _INTL("Frostbite"),
             _INTL("Drowsy")
          ],cmd)


In the file PokeBattle_SceneElements:
Spoiler:

In the class:
class PokemonDataBox < SpriteWrapper
in the function:
  def refresh
Find the line:
      s = 6 if s==PBStatuses::POISON && @battler.statusCount>0   # Badly poisoned
and replace the "6" with "8":
      s = 8 if s==PBStatuses::POISON && @battler.statusCount>0   # Badly poisoned


In the file PScreen_Party:
Spoiler:

In the class:
class PokemonPartyPanel < SpriteWrapper
In the function:
  def refresh
Find the lines:
          # Draw status
          status = -1
          status = 6 if @pokemon.pokerusStage==1
          status = @pokemon.status-1 if @pokemon.status>0
          status = 5 if @pokemon.hp<=0
and replace them with:
          # Draw status
          status = -1
          status = 8 if @pokemon.pokerusStage==1
          status = @pokemon.status-1 if @pokemon.status>0
          status = 7 if @pokemon.hp<=0


In the file PScreen_Summary:
Spoiler:

In the class:
class PokemonSummary_Scene
In the function:
  def drawPage(page)
Find the code:
    # Show status/fainted/Pokérus infected icon
    status = -1
    status = 6 if @pokemon.pokerusStage==1
    status = @pokemon.status-1 if @pokemon.status>0
    status = 5 if @pokemon.hp==0
and replace it:
    # Show status/fainted/Pokérus infected icon
    status = -1
    status = 8 if @pokemon.pokerusStage==1
    status = @pokemon.status-1 if @pokemon.status>0
    status = 7 if @pokemon.hp==0



If you use ZUD for Essentials v18.1 (a wonderful script):

In the file ZUD_03_Battle_Display:
Spoiler:

In the class:
class PokemonDataBox < SpriteWrapper
In the function:
  def refresh
Find the line:
      s = 6 if s==PBStatuses::POISON && @battler.statusCount>0   # Badly poisoned
and replace it:
      s = 8 if s==PBStatuses::POISON && @battler.statusCount>0   # Badly poisoned
Repeat this change in the file ZUD_MaxRaid_01_Battle if you use it.


In the file ZUD_MaxRaid_01_Battle:
Spoiler:

In the function:
  def pbCheer(idxBattler)
Replace this code:
    when cheerHealParty
      if battler==partyPriority.last
        eachSameSideBattler(battler) do |b|
          if b.hp < b.totalhp
            b.pbRecoverHP(b.totalhp.floor)
            pbDisplay(_INTL("{1}'s HP was restored.",b.pbThis))
          end
          status = b.status
          b.pbCureStatus(false)
          case status
          when PBStatuses::BURN
            pbDisplay(_INTL("{1} was healed of its burn!",b.pbThis))  
          when PBStatuses::POISON
            pbDisplay(_INTL("{1} was cured of its poison!",b.pbThis))  
          when PBStatuses::PARALYSIS
            pbDisplay(_INTL("{1} was cured of its paralysis!",b.pbThis))
          when PBStatuses::SLEEP
            pbDisplay(_INTL("{1} woke up!",b.pbThis)) 
          when PBStatuses::FROZEN
            pbDisplay(_INTL("{1} thawed out!",b.pbThis)) 
          end
        end
      end
with this:
    when cheerHealParty
      if battler==partyPriority.last
        eachSameSideBattler(battler) do |b|
          if b.hp < b.totalhp
            b.pbRecoverHP(b.totalhp.floor)
            pbDisplay(_INTL("{1}'s HP was restored.",b.pbThis))
          end
          status = b.status
          b.pbCureStatus(false)
          case status
          when PBStatuses::BURN
            pbDisplay(_INTL("{1} was healed of its burn!",b.pbThis))  
          when PBStatuses::POISON
            pbDisplay(_INTL("{1} was cured of its poison!",b.pbThis))  
          when PBStatuses::PARALYSIS
            pbDisplay(_INTL("{1} was cured of its paralysis!",b.pbThis))
          when PBStatuses::SLEEP
            pbDisplay(_INTL("{1} woke up!",b.pbThis)) 
          when PBStatuses::FROZEN
            pbDisplay(_INTL("{1} thawed out!",b.pbThis)) 
          when PBStatuses::FROSTBITE
            pbDisplay(_INTL("{1} was healed of its frostbite!",b.pbThis))  
          when PBStatuses::DROWSY
            pbDisplay(_INTL("{1} was pull out of drowsiness!",b.pbThis))  
          end
        end
      end


If you use Following Pokémon script for v18.1:

In the file Follower_Config:
Spoiler:

Find this code:
Events.OnTalkToFollower += proc {|pkmn,x,y,randomVal|
# Special Dialogue when statused
  case pkmn.status
  when PBStatuses::POISON
    $scene.spriteset.addUserAnimation(Emo_Poison,x,y)
    pbWait(120)
    pbMessage(_INTL("{1} is shivering with the effects of being poisoned.",pkmn.name))
  when PBStatuses::BURN
    $scene.spriteset.addUserAnimation(Emo_Hate,x,y)
    pbWait(70)
    pbMessage(_INTL("{1}'s burn looks painful.",pkmn.name))
  when PBStatuses::FROZEN
    $scene.spriteset.addUserAnimation(Emo_Normal,x,y)
    pbWait(100)
    pbMessage(_INTL("{1} seems very cold. It's frozen solid!",pkmn.name))
  when PBStatuses::SLEEP
    $scene.spriteset.addUserAnimation(Emo_Normal, x, y)
    pbWait(100)
    pbMessage(_INTL("{1} seems really tired.",pkmn.name))
  when PBStatuses::PARALYSIS
    $scene.spriteset.addUserAnimation(Emo_Normal,x,y)
    pbWait(100)
    pbMessage(_INTL("{1} is standing still and twitching.",pkmn.name))
  end
  next true if pkmn.status != PBStatuses::NONE
}
and below
    pbMessage(_INTL("{1} is standing still and twitching.",pkmn.name))
paste this:
  when PBStatuses::FROSTBITE
    $scene.spriteset.addUserAnimation(Emo_Hate,x,y)
    pbWait(70)
    pbMessage(_INTL("{1}'s frostbite looks painful.",pkmn.name))
  when PBStatuses::DROWSY
    $scene.spriteset.addUserAnimation(Emo_Normal, x, y)
    pbWait(100)
    pbMessage(_INTL("{1} is drowsy...",pkmn.name))


Still in the Following Pokémon plugin:

In the file Follower_Main:
Spoiler:

In the class:
class DependentEventSprites
and in the function:
  def update
Below these lines:
        when PBStatuses::SLEEP
          @sprites[i].tone.set(@sprites[i].tone.red+SLEEPTONE[0],@sprites[i].tone.green+SLEEPTONE[1],@sprites[i].tone.blue+SLEEPTONE[2],@sprites[i].tone.gray+SLEEPTONE[3])
paste this:
        when PBStatuses::FROSTBITE
          @sprites[i].tone.set(@sprites[i].tone.red+FREEZETONE[0],@sprites[i].tone.green+FREEZETONE[1],@sprites[i].tone.blue+FREEZETONE[2],@sprites[i].tone.gray+FREEZETONE[3])
        when PBStatuses::DROWSY
          @sprites[i].tone.set(@sprites[i].tone.red+SLEEPTONE[0],@sprites[i].tone.green+SLEEPTONE[1],@sprites[i].tone.blue+SLEEPTONE[2],@sprites[i].tone.gray+SLEEPTONE[3])



Credits
As always, I don't care about credits, but I was alone on this.

Zigzagoon @ 5,500
Hatch @ 5,515
Linoone @ Level 100: 5,675
Shiny: No
Points: 70
Rattata @ 5,325
Hatch @ 5,340
Raticate @ Level 100: 5,500
Shiny: No
Points: 70
Natu @ 5,161
Hatch @ 5,176
Xatu @ Level 100: 5,321
Shiny: No
Points: 70
Buneary @ 5,064
Offered Fully-Raised @ 5,064
2022 Easter Community Pair Challenge
Shiny: Yes
Points: 250
Exeggcute @ 5,064
Offered Fully-Raised @ 5,064
2022 Easter Community Pair Challenge
Shiny: Yes
Points: 0
Girafarig @ 4,983
Hatch @ 4,998
Level 100: 5,158
Shiny: No
Points: 70

Looking for beta-testers and proof-readers for my fangame!

PorousMist326

Male
Seen 49 Minutes Ago
Posted 4 Days Ago
70 posts
1.8 Years
There are undefined moves in the Pokemon PBS files. Most notably AUTUMNTEMPEST and WARMWELCOME.

StCooler

Mayst thou thy peace discover.

Online now
Posted 7 Hours Ago
5,672 posts
2.3 Years
There are undefined moves in the Pokemon PBS files. Most notably AUTUMNTEMPEST and WARMWELCOME.
Did I spoil my new moves? XD

It's fixed!

Zigzagoon @ 5,500
Hatch @ 5,515
Linoone @ Level 100: 5,675
Shiny: No
Points: 70
Rattata @ 5,325
Hatch @ 5,340
Raticate @ Level 100: 5,500
Shiny: No
Points: 70
Natu @ 5,161
Hatch @ 5,176
Xatu @ Level 100: 5,321
Shiny: No
Points: 70
Buneary @ 5,064
Offered Fully-Raised @ 5,064
2022 Easter Community Pair Challenge
Shiny: Yes
Points: 250
Exeggcute @ 5,064
Offered Fully-Raised @ 5,064
2022 Easter Community Pair Challenge
Shiny: Yes
Points: 0
Girafarig @ 4,983
Hatch @ 4,998
Level 100: 5,158
Shiny: No
Points: 70

Looking for beta-testers and proof-readers for my fangame!

Male
Seen 8 Hours Ago
Posted 1 Week Ago
173 posts
5.3 Years
Hi all,

I added some content of Pokémon Legends: Arceus to my game, so I thought I would share the code.
This add-on implements the code for Drowsy / Frostbite (the new statuses), as well as the new moves, new forms and new Pokémons.

First warnings:
  • This is an addition to the Gen 8 project for Essentials v18.
  • This is NOT for Essentials v18 or v18.1 alone.
  • This is NOT for Essentials v19.
  • I WON'T ADAPT THIS CODE TO V19. My game is in v18, I don't care about v19.
  • Anyone is welcome to integrate this code to v19, if you can adapt it.

Second warnings:
  • I wasn't planning to release this script, so I had to "extract" my edits for you. I may have forgotten some parts. If you feel something is missing and/or something doesn't work as expected, let me know ^^
  • I haven't played (and don't plan to play) to Pokémon Legends: Arceus, so maybe my messages for drowsiness/frostbite are not correct. Please tell me the right messages if you want.
  • Some edits are not "official". I don't like moves that increase evasion so I ignored this boost. Also, I considered that every move that unthaws the user, also removes its frostbite. And Electric moves all remove drowsiness. You can comment the corresponding code if you don't like it.
  • This plugin is almost purely about scripting. For the sprites of the new Pokémons/forms, please follow this thread on Smogon.
  • The new moves + the new common animations for statuses are now on the todo-list for my animation project.

There is a script edit part. As always, be careful with it, make backups before anything.



Add the following data to the corresponding PBS file:
  • pokemon.txt
    Version 1: only the new Pokémons with their official movesets.
    Version 2: only the new Pokémons, with extended movesets (I tried to give more moves to the Pokémons).
    Version 3: all new data in Pokémon Legends: Arceus. You have to edit the PBS yourself.
  • pokemonforms.txt
    Version 1: only the new forms with their official movesets.
    Version 2: only the new forms, with extended movesets (I tried to give more moves to the Pokémons).
    Version 3: all new data in Pokémon Legends: Arceus. You have to edit the PBS yourself.
  • moves.txt
    Only one version. Be careful with the ids of the moves.

For pokemon.txt and pokemonforms.txt, if you don't know what to do, use Version 2 of both. These files give a larger moveset to each Pokémon.
Also, the tutor moves are added as a "TutorMoves" list. You should add them to the tm.txt file. Yes, this is tedious.



Download the attached ZIP file and merge the Graphics folder with your Graphics folder, and replace the files.



Install this script, above Main, and below ZUD and Following Pokémon, if you use any of them.
https://pastebin.com/7qCtWZLj



Ow lawd, they coming.

Step 1 is, as always: make a backup!

Spoiler:

In the file PBStatuses:
Spoiler:

Below the line:
    FROZEN    = 5
add the line:
    FROSTBITE = 6 # Pokémon Legends: Arceus
    DROWSY    = 7 # Pokémon Legends: Arceus
And in the function
    def self.getName(id)
replace the line:
        _INTL("frozen")
with the lines:
        _INTL("frozen"),
        _INTL("frostbitten"), # Pokémon Legends: Arceus
        _INTL("drowsy") # Pokémon Legends: Arceus


In the file Battle_Statuses:
Spoiler:

In the function
  def pbCanInflictStatus?(newStatus,user,showMessages,move=nil,ignoreStatus=false)
Below the line:
        when PBStatuses::FROZEN;    msg = _INTL("{1} is already frozen solid!",pbThis)
paste this line:
        when PBStatuses::FROSTBITE; msg = _INTL("{1} is already frostbitten!",pbThis)
        when PBStatuses::DROWSY;    msg = _INTL("{1} is already drowsy!",pbThis)
Below the lines:
    when PBStatuses::FROZEN
      hasImmuneType |= pbHasType?(:ICE)
paste these lines:
    when PBStatuses::FROSTBITE
      hasImmuneType |= pbHasType?(:ICE)
      hasImmuneType |= pbHasType?(:FIRE)
Below the line:
          when PBStatuses::FROZEN;    msg = _INTL("{1} cannot be frozen solid!",pbThis)
paste this line:
          when PBStatuses::FROSTBITE; msg = _INTL("{1} cannot be frostbitten!",pbThis)
          when PBStatuses::DROWSY;    msg = _INTL("{1} resists drowsiness!",pbThis)
Below the lines:
          when PBStatuses::FROZEN
            msg = _INTL("{1} cannot be frozen solid because of {2}'s {3}!",
               pbThis,immAlly.pbThis(true),immAlly.abilityName)
paste these lines:
          when PBStatuses::FROSTBITE
            msg = _INTL("{1} cannot be frostbitten because of {2}'s {3}!",
               pbThis,immAlly.pbThis(true),immAlly.abilityName)
          when PBStatuses::DROWSY
            msg = _INTL("{1} resists drowsiness because of {2}'s {3}!",
               pbThis,immAlly.pbThis(true),immAlly.abilityName)
Below the line:
          when PBStatuses::FROZEN;    msg = _INTL("{1}'s {2} prevents freezing!",pbThis,abilityName)
paste this line:
          when PBStatuses::FROSTBITE; msg = _INTL("{1}'s {2} prevents frostbites!",pbThis,abilityName)
          when PBStatuses::DROWSY;    msg = _INTL("{1}'s {2} prevents drowsiness!",pbThis,abilityName)
In the function
  def pbCanSynchronizeStatus?(newStatus,target)
Belows the lines:
    when PBStatuses::FROZEN
      hasImmuneType |= pbHasType?(:ICE)
paste these lines:
    when PBStatuses::FROSTBITE
      hasImmuneType |= pbHasType?(:ICE)
      hasImmuneType |= pbHasType?(:FIRE)
In the function:
  def pbInflictStatus(newStatus,newStatusCount=0,msg=nil,user=nil)
Below the lines:
    when PBStatuses::FROZEN
      @battle.pbCommonAnimation("Frozen",self)
      msg = _INTL("{1} was frozen solid!",pbThis) if !msg || msg==""
paste these lines:
    when PBStatuses::FROSTBITE
      @battle.pbCommonAnimation("Frostbitten",self)
      msg = _INTL("{1} was frostbitten!",pbThis) if !msg || msg==""
    when PBStatuses::DROWSY
      @battle.pbCommonAnimation("Drowsy",self)
      msg = _INTL("{1} is drowsy!",pbThis) if !msg || msg==""
In the function:
  def pbContinueStatus
Below the lines:
    when PBStatuses::FROZEN
      anim = "Frozen";    msg = _INTL("{1} is frozen solid!",pbThis)
paste this:
    when PBStatuses::FROSTBITE
      anim = "Frostbitten"; msg = _INTL("{1} was hurt by its frostbite!",pbThis)
    when PBStatuses::DROWSY
      anim = "Drowsy"; msg = _INTL("{1} is drowsy.",pbThis)
In the function:
  def pbCureStatus(showMessages=true)
Below the line:
      when PBStatuses::FROZEN;    @battle.pbDisplay(_INTL("{1} thawed out!",pbThis))
Paste these lines:
      when PBStatuses::FROSTBITE; @battle.pbDisplay(_INTL("{1}'s frostbite was healed!",pbThis))
      when PBStatuses::DROWSY;    @battle.pbDisplay(_INTL("{1} is no longer drowsy!",pbThis))


In the file Battler_UseMove:
Spoiler:

In the function:
  def pbUseMove(choice,specialUsage=false)
find this piece of code:
    # Self-thawing due to the move
    if user.status==PBStatuses::FROZEN && move.thawsUser?
      user.pbCureStatus(false)
      @battle.pbDisplay(_INTL("{1} melted the ice!",user.pbThis))
    end
and paste this above:
    # Pokémon Legends Arceus: Cures Drowsy.
    if user.status==PBStatuses::DROWSY && move.undrowsesUser?
      user.pbCureStatus(false)
      @battle.pbDisplay(_INTL("{1} is longer drowsy!",user.pbThis))
    end
    # Pokémon Legends Arceus: Cures Frostbite.
    if user.status==PBStatuses::FROSTBITE && move.thawsUser?
      user.pbCureStatus(false)
      @battle.pbDisplay(_INTL("{1} cures its frostbite!",user.pbThis))
    end



In the file Battler_UseMove_SuccessChecks:
Spoiler:

Below the following code:
    # Paralysis
    if @status==PBStatuses::PARALYSIS
      if @battle.pbRandom(100)<25
        pbContinueStatus
        @lastMoveFailed = true
        return false
      end
    end
paste this code:
    # Drowsy
    if @status==PBStatuses::DROWSY
      if @battle.pbRandom(100)<25
        pbContinueStatus
        @lastMoveFailed = true
        return false
      end
    end


In the file Move_Usage_Calculations:
Spoiler:

Below the follow code:
    # Burn
    if user.status==PBStatuses::BURN && physicalMove? && damageReducedByBurn? &&
       !user.hasActiveAbility?(:GUTS)
      multipliers[FINAL_DMG_MULT] /= 2
    end
paste this:
    # Frostbite (Pokémon Legends: Arceus)
    if user.status==PBStatuses::FROSTBITE && specialMove? && damageReducedByFrostbite? &&
       !user.hasActiveAbility?(:GUTS)
      multipliers[FINAL_DMG_MULT] /= 2
    end
    # Drowsy (Pokémon Legends: Arceus)
    if target.status==PBStatuses::DROWSY
      multipliers[FINAL_DMG_MULT] /= 1.25 # I don't know the exact value.
    end
Below the following code:
    if @battle.pbWeather == PBWeather::Sandstorm
      if target.pbHasType?(:ROCK) && specialMove? && @function!="122"   # Psyshock
        multipliers[DEF_MULT] *= 1.5
      end
    end
paste this:
    # Pokémon Legends: Arceus
    if user.effects[PBEffects::VictoryDance]
      multipliers[FINAL_DMG_MULT] *= 1.5 
    end


In the file Battle_Phase_EndOfRound:
Spoiler:

Below this piece of code:
    # Damage from burn
    priority.each do |b|
      next if b.status!=PBStatuses::BURN || !b.takesIndirectDamage?
      oldHP = b.hp
      dmg = (NEWEST_BATTLE_MECHANICS) ? b.totalhp/16 : b.totalhp/8
      dmg = (dmg/2.0).round if b.hasActiveAbility?(:HEATPROOF)
      b.pbContinueStatus { b.pbReduceHP(dmg,false) }
      b.pbItemHPHealCheck
      b.pbAbilitiesOnDamageTaken(oldHP)
      b.pbFaint if b.fainted?
    end
paste this:
    # Damage from frostbite (Pokémon Legends: Arceus)
    priority.each do |b|
      next if b.status!=PBStatuses::FROSTBITE || !b.takesIndirectDamage?
      oldHP = b.hp
      dmg = (NEWEST_BATTLE_MECHANICS) ? b.totalhp/16 : b.totalhp/8
      dmg = (dmg/2.0).round if b.hasActiveAbility?(:MAGMAARMOR)
      b.pbContinueStatus { b.pbReduceHP(dmg,false) }
      b.pbItemHPHealCheck
      b.pbAbilitiesOnDamageTaken(oldHP)
      b.pbFaint if b.fainted?
    end
Above the comment:
    # Damage from Hyper Mode (Shadow Pokémon)
paste this code:
    # Pokémon Legends: Arceus
    # Stone Axe Splinters
    priority.each do |b|
      b.effects[PBEffects::StoneAxe] -= 1
      next if b.effects[PBEffects::StoneAxe] < 0
      next if !b.takesIndirectDamage?
      pbCommonAnimation("StoneAxe",b)
      oldHP = b.hp
      b.pbReduceHP(b.totalhp/8)
      pbDisplay(_INTL("The stone axe splinters hurt {1}!",b.pbThis(true)))
      b.pbItemHPHealCheck
      b.pbAbilitiesOnDamageTaken(oldHP)
      b.pbFaint if b.fainted?
    end
    # Ceaseless Edge Splinters
    priority.each do |b|
      b.effects[PBEffects::CeaselessEdge] -= 1
      next if b.effects[PBEffects::CeaselessEdge] < 0
      next if !b.takesIndirectDamage?
      pbCommonAnimation("CeaselessEdge",b)
      oldHP = b.hp
      b.pbReduceHP(b.totalhp/8)
      pbDisplay(_INTL("The ceaseless edge splinters hurt {1}!",b.pbThis(true)))
      b.pbItemHPHealCheck
      b.pbAbilitiesOnDamageTaken(oldHP)
      b.pbFaint if b.fainted?
    end


In the file AI_Move_EffectScores:
Spoiler:

Find the code for:
    when "018"
In this part, replace the line:
      when PBStatuses::BURN, PBStatuses::PARALYSIS, PBStatuses::FROSTBITE
with the line:
      when PBStatuses::BURN, PBStatuses::PARALYSIS, PBStatuses::FROSTBITE, PBStatuses::DROWSY
Similarly, find the code for:
    when "07D"
and replace:
      score -= 20 if target.status==PBStatuses::SLEEP &&   # Will cure status
                     target.statusCount>1
with:
      score -= 20 if (target.status==PBStatuses::SLEEP || 
                      target.status==PBStatuses::DROWSY) &&   # Will cure status
                     target.statusCount>1
Find the code for:
    when "110"
and below:
        score += 80 if user.pbOwnSide.effects[PBEffects::StealthRock]
paste this:
        score += 80 if user.pbOwnSide.effects[PBEffects::StoneAxe] > -1
        score += 80 if user.pbOwnSide.effects[PBEffects::CeaselessEdge] > -1
Find the code for:
    when "15A"
and replace:
      if target.opposes?(user)
        score -= 40 if target.status==PBStatuses::BURN
      else
        score += 40 if target.status==PBStatuses::BURN
      end
with
      if target.opposes?(user)
        score -= 40 if target.status==PBStatuses::BURN || target.status==PBStatuses::FROSTBITE
      else
        score += 40 if target.status==PBStatuses::BURN || target.status==PBStatuses::FROSTBITE
      end
If you use the Gen 8 project for v18.1 (which I do), the last line in the AI should be:
    #---------------------------------------------------------------------------
    when "198" # Eerie Spell
      score -= 40
Below that, paste the following piece of code:
    #---------------------------------------------------------------------------
    when "200" # Dire Claw
      score += 30 if target.status==PBStatuses::NONE
    #---------------------------------------------------------------------------
    when "201" # Power Shift
      if skill>=PBTrainerAI.mediumSkill
        aatk = pbRoughStat(user,PBStats::ATTACK,skill)
        adef = pbRoughStat(user,PBStats::DEFENSE,skill)
        asatk = pbRoughStat(user,PBStats::SPATK,skill)
        asdef = pbRoughStat(user,PBStats::SPDEF,skill)
        if (aatk==adef && asatk==asdef) ||
           user.effects[PBEffects::PowerShift]   # No flip-flopping
          score -= 90
        elsif adef>aatk || asdef>asatk  # Prefer a higher Attack
          score += 30
        else
          score -= 30
        end
      else
        score -= 30
      end
    #---------------------------------------------------------------------------
    when "202" # Stone Axe
      score += 60 if target.effects[PBEffects::StoneAxe] < 0
    #---------------------------------------------------------------------------
    when "203" # Ceaseless Edge
      score += 60 if target.effects[PBEffects::CeaselessEdge] < 0
    #---------------------------------------------------------------------------
    when "204" # Springtide Storm
      if move.statusMove?
        if user.statStageAtMax?(PBStats::DEFENSE)
          score -= 90
        else
          score += 40 if user.turnCount==0
          score -= user.stages[PBStats::DEFENSE]*20
        end
      else
        score += 10 if user.turnCount==0
        score += 20 if user.stages[PBStats::DEFENSE]<0
      end
    #---------------------------------------------------------------------------
    when "205" # Mystical Power
      if skill>=PBTrainerAI.mediumSkill
        aatk = pbRoughStat(user,PBStats::ATTACK,skill)
        adef = pbRoughStat(user,PBStats::DEFENSE,skill)
        asatk = pbRoughStat(user,PBStats::SPATK,skill)
        asdef = pbRoughStat(user,PBStats::SPDEF,skill)
        if aatk + asatk >= adef + asdef
          if user.statStageAtMax?(PBStats::ATTACK) && user.statStageAtMax?(PBStats::SPATK)
            score -= 90
          else
            score += 40 if user.turnCount==0
            score -= user.stages[PBStats::ATTACK]*20
            score -= user.stages[PBStats::SPATK]*20
          end
        else 
          if user.statStageAtMax?(PBStats::DEFENSE) && user.statStageAtMax?(PBStats::SPDEF)
            score -= 90
          else
            score += 40 if user.turnCount==0
            score -= user.stages[PBStats::DEFENSE]*20
            score -= user.stages[PBStats::SPDEF]*20
          end
        end 
      else
        score -= 30
      end
    #---------------------------------------------------------------------------
    when "206" # Wave Crash
      score -= 20
    #---------------------------------------------------------------------------
    when "207" # Chloroblast
      score -= 20
    #---------------------------------------------------------------------------
    when "208" # Victory Dance
      if skill>=PBTrainerAI.mediumSkill
        if user.statStageAtMax?(PBStats::DEFENSE) && user.statStageAtMax?(PBStats::SPDEF) &&
          user.statStageAtMax?(PBStats::ATTACK) && user.statStageAtMax?(PBStats::SPATK)
          score -= 90
        else
          score += 40 if user.turnCount==0 || !user.effects[PBEffects::VictoryDance]
          score -= user.stages[PBStats::DEFENSE]*10
          score -= user.stages[PBStats::SPDEF]*10
          score -= user.stages[PBStats::ATTACK]*10
          score -= user.stages[PBStats::SPATK]*10
        end
      else
        score -= 30
      end
    #---------------------------------------------------------------------------
    when "209" # Barb Barrage
      score += 30 if target.status != PBStatuses::NONE
    #---------------------------------------------------------------------------
    when "210" # Bitter Malice
      score += 30 if target.status != PBStatuses::NONE
    #---------------------------------------------------------------------------
    when "211" # Infernal Parade
      score += 30 if target.status != PBStatuses::NONE
    #---------------------------------------------------------------------------
    when "212" # Triple Arrows
      score += 30 if user.effects[PBEffects::FocusEnergy]<2
      score += user.stages[PBStats::DEFENSE]*10
    #---------------------------------------------------------------------------
    when "213" # Bleakwind Storm
      if target.pbCanFrostbite?(user,false)
        score += 30
        if skill>=PBTrainerAI.highSkill
          score -= 40 if target.hasActiveAbility?([:GUTS,:MARVELSCALE,:QUICKFEET])
        end
      else
        if skill>=PBTrainerAI.mediumSkill
          score -= 90 if move.statusMove?
        end
      end
    #---------------------------------------------------------------------------
    when "214" # Lunar Blessing
      if user.hp==user.totalhp || (skill>=PBTrainerAI.mediumSkill && !user.canHeal?)
        score -= 90
      else
        score += 50
        score -= user.hp*100/user.totalhp
      end
      case user.status
      when PBStatuses::POISON
        score += 40
        if skill>=PBTrainerAI.mediumSkill
          if user.hp<user.totalhp/8
            score += 60
          elsif skill>=PBTrainerAI.highSkill &&
             user.hp<(user.effects[PBEffects::Toxic]+1)*user.totalhp/16
            score += 60
          end
        end
      when PBStatuses::BURN, PBStatuses::PARALYSIS, PBStatuses::FROSTBITE, PBStatuses::DROWSY
        score += 40
      else
        score -= 90
      end
    #---------------------------------------------------------------------------
    when "215" # Take Heart
      if skill>=PBTrainerAI.mediumSkill
        if user.statStageAtMax?(PBStats::DEFENSE) && user.statStageAtMax?(PBStats::SPDEF) &&
          user.statStageAtMax?(PBStats::ATTACK) && user.statStageAtMax?(PBStats::SPATK)
          score -= 90
        else
          score += 40 if user.turnCount==0 
          score -= user.stages[PBStats::DEFENSE]*10
          score -= user.stages[PBStats::SPDEF]*10
          score -= user.stages[PBStats::ATTACK]*10
          score -= user.stages[PBStats::SPATK]*10
        end
      else
        score -= 30
      end
      case user.status
      when PBStatuses::POISON
        score += 40
        if skill>=PBTrainerAI.mediumSkill
          if user.hp<user.totalhp/8
            score += 60
          elsif skill>=PBTrainerAI.highSkill &&
             user.hp<(user.effects[PBEffects::Toxic]+1)*user.totalhp/16
            score += 60
          end
        end
      when PBStatuses::BURN, PBStatuses::PARALYSIS, PBStatuses::FROSTBITE, PBStatuses::DROWSY
        score += 40
      else
        score -= 90
      end


In the file AI_Move_Utilities:
Spoiler:

Find the code:
# Burn
if skill>=PBTrainerAI.highSkill
if user.status==PBStatuses::BURN && move.physicalMove?(type) &&
!user.hasActiveAbility?(:GUTS) &&
!(NEWEST_BATTLE_MECHANICS && move.function=="07E") # Facade
multipliers[FINAL_DMG_MULT] /= 2
end
end
and below it, paste this:
# Frostbite (Pokémon Legends: Arceus)
if skill>=PBTrainerAI.highSkill
if user.status==PBStatuses::FROSTBITE && move.specialMove?(type) &&
!user.hasActiveAbility?(:GUTS) &&
!(NEWEST_BATTLE_MECHANICS && move.function=="07E") # Facade
multipliers[FINAL_DMG_MULT] /= 2
end
end


In the file PokeBattle_BattlePalace:
Spoiler:

In the function:
  def pbEnemyShouldWithdraw?(idxBattler)
Find the code:
      case thispkmn.status
      when PBStatuses::SLEEP, PBStatuses::FROZEN
        factor += 20
      when PBStatuses::POISON, PBStatuses::BURN
        factor += 10
      when PBStatuses::PARALYSIS
        factor += 15
      end
and replace it with:
      case thispkmn.status
      when PBStatuses::SLEEP, PBStatuses::FROZEN
        factor += 20
      when PBStatuses::POISON, PBStatuses::BURN, PBStatuses::FROSTBITE
        factor += 10
      when PBStatuses::PARALYSIS, PBStatuses::DROWSY
        factor += 15
      end


In the file Debug_Pokemon:
Spoiler:

In the function
  def pbPokemonDebugActions(command,pkmn,pkmnid,heldpoke=nil,settingUpBattle=false)
find the code:
          cmd = pbShowCommands(_INTL("Set {1}'s status.",pkmn.name),[
             _INTL("[Cure]"),
             _INTL("Sleep"),
             _INTL("Poison"),
             _INTL("Burn"),
             _INTL("Paralysis"),
             _INTL("Frozen")
          ],cmd)
and replace it with:
          cmd = pbShowCommands(_INTL("Set {1}'s status.",pkmn.name),[
             _INTL("[Cure]"),
             _INTL("Sleep"),
             _INTL("Poison"),
             _INTL("Burn"),
             _INTL("Paralysis"),
             _INTL("Frozen"),
             _INTL("Frostbite"),
             _INTL("Drowsy")
          ],cmd)


In the file PokeBattle_SceneElements:
Spoiler:

In the class:
class PokemonDataBox < SpriteWrapper
in the function:
  def refresh
Find the line:
      s = 6 if s==PBStatuses::POISON && @battler.statusCount>0   # Badly poisoned
and replace the "6" with "8":
      s = 8 if s==PBStatuses::POISON && @battler.statusCount>0   # Badly poisoned


In the file PScreen_Party:
Spoiler:

In the class:
class PokemonPartyPanel < SpriteWrapper
In the function:
  def refresh
Find the lines:
          # Draw status
          status = -1
          status = 6 if @pokemon.pokerusStage==1
          status = @pokemon.status-1 if @pokemon.status>0
          status = 5 if @pokemon.hp<=0
and replace them with:
          # Draw status
          status = -1
          status = 8 if @pokemon.pokerusStage==1
          status = @pokemon.status-1 if @pokemon.status>0
          status = 7 if @pokemon.hp<=0


In the file PScreen_Summary:
Spoiler:

In the class:
class PokemonSummary_Scene
In the function:
  def drawPage(page)
Find the code:
    # Show status/fainted/Pokérus infected icon
    status = -1
    status = 6 if @pokemon.pokerusStage==1
    status = @pokemon.status-1 if @pokemon.status>0
    status = 5 if @pokemon.hp==0
and replace it:
    # Show status/fainted/Pokérus infected icon
    status = -1
    status = 8 if @pokemon.pokerusStage==1
    status = @pokemon.status-1 if @pokemon.status>0
    status = 7 if @pokemon.hp==0



If you use ZUD for Essentials v18.1 (a wonderful script):

In the file ZUD_03_Battle_Display:
Spoiler:

In the class:
class PokemonDataBox < SpriteWrapper
In the function:
  def refresh
Find the line:
      s = 6 if s==PBStatuses::POISON && @battler.statusCount>0   # Badly poisoned
and replace it:
      s = 8 if s==PBStatuses::POISON && @battler.statusCount>0   # Badly poisoned
Repeat this change in the file ZUD_MaxRaid_01_Battle if you use it.


In the file ZUD_MaxRaid_01_Battle:
Spoiler:

In the function:
  def pbCheer(idxBattler)
Replace this code:
    when cheerHealParty
      if battler==partyPriority.last
        eachSameSideBattler(battler) do |b|
          if b.hp < b.totalhp
            b.pbRecoverHP(b.totalhp.floor)
            pbDisplay(_INTL("{1}'s HP was restored.",b.pbThis))
          end
          status = b.status
          b.pbCureStatus(false)
          case status
          when PBStatuses::BURN
            pbDisplay(_INTL("{1} was healed of its burn!",b.pbThis))  
          when PBStatuses::POISON
            pbDisplay(_INTL("{1} was cured of its poison!",b.pbThis))  
          when PBStatuses::PARALYSIS
            pbDisplay(_INTL("{1} was cured of its paralysis!",b.pbThis))
          when PBStatuses::SLEEP
            pbDisplay(_INTL("{1} woke up!",b.pbThis)) 
          when PBStatuses::FROZEN
            pbDisplay(_INTL("{1} thawed out!",b.pbThis)) 
          end
        end
      end
with this:
    when cheerHealParty
      if battler==partyPriority.last
        eachSameSideBattler(battler) do |b|
          if b.hp < b.totalhp
            b.pbRecoverHP(b.totalhp.floor)
            pbDisplay(_INTL("{1}'s HP was restored.",b.pbThis))
          end
          status = b.status
          b.pbCureStatus(false)
          case status
          when PBStatuses::BURN
            pbDisplay(_INTL("{1} was healed of its burn!",b.pbThis))  
          when PBStatuses::POISON
            pbDisplay(_INTL("{1} was cured of its poison!",b.pbThis))  
          when PBStatuses::PARALYSIS
            pbDisplay(_INTL("{1} was cured of its paralysis!",b.pbThis))
          when PBStatuses::SLEEP
            pbDisplay(_INTL("{1} woke up!",b.pbThis)) 
          when PBStatuses::FROZEN
            pbDisplay(_INTL("{1} thawed out!",b.pbThis)) 
          when PBStatuses::FROSTBITE
            pbDisplay(_INTL("{1} was healed of its frostbite!",b.pbThis))  
          when PBStatuses::DROWSY
            pbDisplay(_INTL("{1} was pull out of drowsiness!",b.pbThis))  
          end
        end
      end


If you use Following Pokémon script for v18.1:

In the file Follower_Config:
Spoiler:

Find this code:
Events.OnTalkToFollower += proc {|pkmn,x,y,randomVal|
# Special Dialogue when statused
  case pkmn.status
  when PBStatuses::POISON
    $scene.spriteset.addUserAnimation(Emo_Poison,x,y)
    pbWait(120)
    pbMessage(_INTL("{1} is shivering with the effects of being poisoned.",pkmn.name))
  when PBStatuses::BURN
    $scene.spriteset.addUserAnimation(Emo_Hate,x,y)
    pbWait(70)
    pbMessage(_INTL("{1}'s burn looks painful.",pkmn.name))
  when PBStatuses::FROZEN
    $scene.spriteset.addUserAnimation(Emo_Normal,x,y)
    pbWait(100)
    pbMessage(_INTL("{1} seems very cold. It's frozen solid!",pkmn.name))
  when PBStatuses::SLEEP
    $scene.spriteset.addUserAnimation(Emo_Normal, x, y)
    pbWait(100)
    pbMessage(_INTL("{1} seems really tired.",pkmn.name))
  when PBStatuses::PARALYSIS
    $scene.spriteset.addUserAnimation(Emo_Normal,x,y)
    pbWait(100)
    pbMessage(_INTL("{1} is standing still and twitching.",pkmn.name))
  end
  next true if pkmn.status != PBStatuses::NONE
}
and below
    pbMessage(_INTL("{1} is standing still and twitching.",pkmn.name))
paste this:
  when PBStatuses::FROSTBITE
    $scene.spriteset.addUserAnimation(Emo_Hate,x,y)
    pbWait(70)
    pbMessage(_INTL("{1}'s frostbite looks painful.",pkmn.name))
  when PBStatuses::DROWSY
    $scene.spriteset.addUserAnimation(Emo_Normal, x, y)
    pbWait(100)
    pbMessage(_INTL("{1} is drowsy...",pkmn.name))


Still in the Following Pokémon plugin:

In the file Follower_Main:
Spoiler:

In the class:
class DependentEventSprites
and in the function:
  def update
Below these lines:
        when PBStatuses::SLEEP
          @sprites[i].tone.set(@sprites[i].tone.red+SLEEPTONE[0],@sprites[i].tone.green+SLEEPTONE[1],@sprites[i].tone.blue+SLEEPTONE[2],@sprites[i].tone.gray+SLEEPTONE[3])
paste this:
        when PBStatuses::FROSTBITE
          @sprites[i].tone.set(@sprites[i].tone.red+FREEZETONE[0],@sprites[i].tone.green+FREEZETONE[1],@sprites[i].tone.blue+FREEZETONE[2],@sprites[i].tone.gray+FREEZETONE[3])
        when PBStatuses::DROWSY
          @sprites[i].tone.set(@sprites[i].tone.red+SLEEPTONE[0],@sprites[i].tone.green+SLEEPTONE[1],@sprites[i].tone.blue+SLEEPTONE[2],@sprites[i].tone.gray+SLEEPTONE[3])




As always, I don't care about credits, but I was alone on this.
Great job!!!

StCooler

Mayst thou thy peace discover.

Online now
Posted 7 Hours Ago
5,672 posts
2.3 Years
I thought Ursaluna should be Ground/Normal instead of Normal/Ground?
You can easily change that ^^
But I thought that upon evolving, the new type would be added, rather than replacing the first type.

Zigzagoon @ 5,500
Hatch @ 5,515
Linoone @ Level 100: 5,675
Shiny: No
Points: 70
Rattata @ 5,325
Hatch @ 5,340
Raticate @ Level 100: 5,500
Shiny: No
Points: 70
Natu @ 5,161
Hatch @ 5,176
Xatu @ Level 100: 5,321
Shiny: No
Points: 70
Buneary @ 5,064
Offered Fully-Raised @ 5,064
2022 Easter Community Pair Challenge
Shiny: Yes
Points: 250
Exeggcute @ 5,064
Offered Fully-Raised @ 5,064
2022 Easter Community Pair Challenge
Shiny: Yes
Points: 0
Girafarig @ 4,983
Hatch @ 4,998
Level 100: 5,158
Shiny: No
Points: 70

Looking for beta-testers and proof-readers for my fangame!

curryofthepast

Were they a fool, a sage or a lonely friend?

Caw
Crow's nest
Seen 2 Hours Ago
Posted 4 Weeks Ago
13 posts
3.2 Years
Thanks for the hard work. I made a modification of the move script if that's okay. I didn't want to do edits to status scripts or status graphics, so I removed all of them. Frostbite and burn can be treated as the same thing mechanically imo, although StCooler's status implementations are very cool. I also tightened up Ceaseless Edge/Stone Axe by giving both moves the same effect, now named PBEffects::Splinters.

If anyone uses it credit still goes to StCooler. Script still goes above Main, and below ZUD and Following Pokémon, if you use any of them. Most v18 code used seems compatible with v19, but I adapted this to v19 where I spotted small possible differences. Personal assembly required, users should read the code (especially on Rapid Spin) and follow OP's script tweaks, apart from the parts that deal with new status conditions. Moves.txt also needs personal tweaks for the changed move codes. https://pastebin.com/tpQEd2MW

There's one line of new code I added that I'm not 100% sure on. I replaced drowzy on Dire Claw with yawn instead. I don't see why it wouldn't work in Ruby, but I've never seen a script in Essentials apply status this way. It's hard to debug this move at this stage.
when 0 then target.effects[PBEffects::Yawn] = 2 if target.pbCanSleepYawn?(user,false,self)
The new code for Stone Axe/Splinters In the file Battle_Phase_EndOfRound:
Spoiler:
    # Damage from Hyper Mode (Shadow Pokémon)
    # Pokémon Legends: Arceus
    # Stone Axe Splinters
    priority.each do |b|
      b.effects[PBEffects::Splinters] -= 1
      next if b.effects[PBEffects::Splinters] < 0
      next if !b.takesIndirectDamage?
      pbCommonAnimation("StoneAxe",b) #placeholder, make your own animation
      oldHP = b.hp
      b.pbReduceHP(b.totalhp/8)
      pbDisplay(_INTL("The scattered splinters hurt {1}!",b.pbThis(true)))
      b.pbItemHPHealCheck
      b.pbAbilitiesOnDamageTaken(oldHP)
      b.pbFaint if b.fainted?
    end

As an added note, this is similar to Infestation without the trapping, but having a new script is good because it lets the effect apply a new common animation. I'm really hoping we get to see an animation added for Stealth Rock and/or Splinters in the Gen 8 animation project!

StCooler

Mayst thou thy peace discover.

Online now
Posted 7 Hours Ago
5,672 posts
2.3 Years
By the way, what is"LavaTrap" "IcyRock" and "SmoothRock"?
Whoops! I really need to check my code before posting -_-
They are spoilers of some moves I made for my game ^^"
It's fixed.

Thanks for the hard work. I made a modification of the move script if that's okay. I didn't want to do edits to status scripts or status graphics, so I removed all of them. Frostbite and burn can be treated as the same thing mechanically imo, although StCooler's status implementations are very cool. I also tightened up Ceaseless Edge/Stone Axe by giving both moves the same effect, now named PBEffects::Splinters.
Actually I have a code to let you choose whether to use Drowsy/Frostbite or Sleep/Freeze ^^
Check out the first two constants of the script:

PLA_STATUS_MODE_FROSTBITE = 0
PLA_STATUS_MODE_DROWSY = 0
# 0 = new moves inflict Drowsy and Frostbite (respectively), old moves keep 
#     inflicting Sleep and Freeze.
# 1 = new moves AND old moves inflict Drowsy and Frostbite.
#     NB: Value 1 does not change the behaviour of Rest, Comatose and Yawn 
#     and I don't want to waste my time.
# 2 = new moves AND old moves inflict Sleep and Freeze.
If anyone uses it credit still goes to StCooler. Script still goes above Main, and below ZUD and Following Pokémon, if you use any of them. Most v18 code used seems compatible with v19, but I adapted this to v19 where I spotted small possible differences. Personal assembly required, users should read the code (especially on Rapid Spin) and follow OP's script tweaks, apart from the parts that deal with new status conditions. Moves.txt also needs personal tweaks for the changed move codes. https://pastebin.com/tpQEd2MW

There's one line of new code I added that I'm not 100% sure on. I replaced drowzy on Dire Claw with yawn instead. I don't see why it wouldn't work in Ruby, but I've never seen a script in Essentials apply status this way. It's hard to debug this move at this stage.
when 0 then target.effects[PBEffects::Yawn] = 2 if target.pbCanSleepYawn?(user,false,self)
It should be :
when 0 ; target.effects[PBEffects::Yawn] = 2 if target.pbCanSleepYawn?(user,false,self)
(Use ";" instead of "then")
It should be OK now.

The new code for Stone Axe/Splinters In the file Battle_Phase_EndOfRound:
Spoiler:
    # Damage from Hyper Mode (Shadow Pokémon)
    # Pokémon Legends: Arceus
    # Stone Axe Splinters
    priority.each do |b|
      b.effects[PBEffects::Splinters] -= 1
      next if b.effects[PBEffects::Splinters] < 0
      next if !b.takesIndirectDamage?
      pbCommonAnimation("StoneAxe",b) #placeholder, make your own animation
      oldHP = b.hp
      b.pbReduceHP(b.totalhp/8)
      pbDisplay(_INTL("The scattered splinters hurt {1}!",b.pbThis(true)))
      b.pbItemHPHealCheck
      b.pbAbilitiesOnDamageTaken(oldHP)
      b.pbFaint if b.fainted?
    end
Note that the line:
# Damage from Hyper Mode (Shadow Pokémon)
Should be below the code for Stone Axe and Ceaseless Edge ^^

As an added note, this is similar to Infestation without the trapping, but having a new script is good because it lets the effect apply a new common animation. I'm really hoping we get to see an animation added for Stealth Rock and/or Splinters in the Gen 8 animation project!
Exactly my intent + I wanted to cumulate effects (trapping + two splinters). Using the same code means that they replace each other upon activation (if you use a trapping move, and then Stone Axe, then the damage of Stone Axe will replace that of the trapping move).
And the Gen 8 animation project... It's hard T__T

Zigzagoon @ 5,500
Hatch @ 5,515
Linoone @ Level 100: 5,675
Shiny: No
Points: 70
Rattata @ 5,325
Hatch @ 5,340
Raticate @ Level 100: 5,500
Shiny: No
Points: 70
Natu @ 5,161
Hatch @ 5,176
Xatu @ Level 100: 5,321
Shiny: No
Points: 70
Buneary @ 5,064
Offered Fully-Raised @ 5,064
2022 Easter Community Pair Challenge
Shiny: Yes
Points: 250
Exeggcute @ 5,064
Offered Fully-Raised @ 5,064
2022 Easter Community Pair Challenge
Shiny: Yes
Points: 0
Girafarig @ 4,983
Hatch @ 4,998
Level 100: 5,158
Shiny: No
Points: 70

Looking for beta-testers and proof-readers for my fangame!

StCooler

Mayst thou thy peace discover.

Online now
Posted 7 Hours Ago
5,672 posts
2.3 Years
I noticed all the moves' Power and Accuracy are in the Strong Style.
Yes indeed.
This is because the Powers and Accuracies of the Strong Style of the old moves correspond to their respective Powers and Accuracies in the old games.

Zigzagoon @ 5,500
Hatch @ 5,515
Linoone @ Level 100: 5,675
Shiny: No
Points: 70
Rattata @ 5,325
Hatch @ 5,340
Raticate @ Level 100: 5,500
Shiny: No
Points: 70
Natu @ 5,161
Hatch @ 5,176
Xatu @ Level 100: 5,321
Shiny: No
Points: 70
Buneary @ 5,064
Offered Fully-Raised @ 5,064
2022 Easter Community Pair Challenge
Shiny: Yes
Points: 250
Exeggcute @ 5,064
Offered Fully-Raised @ 5,064
2022 Easter Community Pair Challenge
Shiny: Yes
Points: 0
Girafarig @ 4,983
Hatch @ 4,998
Level 100: 5,158
Shiny: No
Points: 70

Looking for beta-testers and proof-readers for my fangame!

StCooler

Mayst thou thy peace discover.

Online now
Posted 7 Hours Ago
5,672 posts
2.3 Years
Not really.I checked them out.Some moves' base Powers and Accuracies are lower correspond to old games by 5-10,but some moves are the same or higher.I think this is because PLA had its own balance system.So I'm a little tangled here.
You're right.

Pokémon Legends Arceus has its own battle system. I wanted to adapt the new moves to an old system. So I have to make choices.
Some moves are maybe too powerful when included to an old-style fangame, but that's not *my* problem. The dev has to make the balance himself.
I will release a somewhat balanced move file with *my* balancing, with custom accuracies and powers.

Zigzagoon @ 5,500
Hatch @ 5,515
Linoone @ Level 100: 5,675
Shiny: No
Points: 70
Rattata @ 5,325
Hatch @ 5,340
Raticate @ Level 100: 5,500
Shiny: No
Points: 70
Natu @ 5,161
Hatch @ 5,176
Xatu @ Level 100: 5,321
Shiny: No
Points: 70
Buneary @ 5,064
Offered Fully-Raised @ 5,064
2022 Easter Community Pair Challenge
Shiny: Yes
Points: 250
Exeggcute @ 5,064
Offered Fully-Raised @ 5,064
2022 Easter Community Pair Challenge
Shiny: Yes
Points: 0
Girafarig @ 4,983
Hatch @ 4,998
Level 100: 5,158
Shiny: No
Points: 70

Looking for beta-testers and proof-readers for my fangame!

PorousMist326

Male
Seen 49 Minutes Ago
Posted 4 Days Ago
70 posts
1.8 Years
Thanks for the hard work. I made a modification of the move script if that's okay. I didn't want to do edits to status scripts or status graphics, so I removed all of them. Frostbite and burn can be treated as the same thing mechanically imo, although StCooler's status implementations are very cool. I also tightened up Ceaseless Edge/Stone Axe by giving both moves the same effect, now named PBEffects::Splinters.

If anyone uses it credit still goes to StCooler. Script still goes above Main, and below ZUD and Following Pokémon, if you use any of them. Most v18 code used seems compatible with v19, but I adapted this to v19 where I spotted small possible differences. Personal assembly required, users should read the code (especially on Rapid Spin) and follow OP's script tweaks, apart from the parts that deal with new status conditions. Moves.txt also needs personal tweaks for the changed move codes. https://pastebin.com/tpQEd2MW

There's one line of new code I added that I'm not 100% sure on. I replaced drowzy on Dire Claw with yawn instead. I don't see why it wouldn't work in Ruby, but I've never seen a script in Essentials apply status this way. It's hard to debug this move at this stage.
when 0 then target.effects[PBEffects::Yawn] = 2 if target.pbCanSleepYawn?(user,false,self)
The new code for Stone Axe/Splinters In the file Battle_Phase_EndOfRound:
Spoiler:
    # Damage from Hyper Mode (Shadow Pokémon)
    # Pokémon Legends: Arceus
    # Stone Axe Splinters
    priority.each do |b|
      b.effects[PBEffects::Splinters] -= 1
      next if b.effects[PBEffects::Splinters] < 0
      next if !b.takesIndirectDamage?
      pbCommonAnimation("StoneAxe",b) #placeholder, make your own animation
      oldHP = b.hp
      b.pbReduceHP(b.totalhp/8)
      pbDisplay(_INTL("The scattered splinters hurt {1}!",b.pbThis(true)))
      b.pbItemHPHealCheck
      b.pbAbilitiesOnDamageTaken(oldHP)
      b.pbFaint if b.fainted?
    end

As an added note, this is similar to Infestation without the trapping, but having a new script is good because it lets the effect apply a new common animation. I'm really hoping we get to see an animation added for Stealth Rock and/or Splinters in the Gen 8 animation project!
Is this everything I need to do to implement this code into v19.1?

curryofthepast

Were they a fool, a sage or a lonely friend?

Caw
Crow's nest
Seen 2 Hours Ago
Posted 4 Weeks Ago
13 posts
3.2 Years
@PorousMist326 I don't know because I'm not a Ruby expert. I come from Python and C-likes. I'm using most recent v19.1 and cross-referencing between StCooler's scripts and base v19.1, the only difference was when 0 then as opposed to when 0 ;. The biggest changes from v18 I can see is in what the script headers and some functions are named. Generally, v19.1 is less verbose and easier to understand imo. Most scripters should be able to fix possible differences from experience or after using and reading Essentials files long enough.

Most of the code looks the same between versions, everything compiled for me and I haven't run into problems so what I posted should just work *just be careful with Stealth Rock. I mostly post my code so I can cross-reference, find bugs/errors in what I did or maybe help other users improve their code too.

StCooler

Mayst thou thy peace discover.

Online now
Posted 7 Hours Ago
5,672 posts
2.3 Years
I noticed in Ver1 of pokemonform.txt,some pre-evo pokemons have eggmoves but some not.
There is no Egg Breeding in PLA. So I want to know how you decide these moves?
This is why I didn't want to release this resource in the first place: every time I make a resource, it's for myself first, and then I extract everything to make it usable by others. I use Version 2 of pokemon.txt / pokemonforms.txt, and Version 1 is me trying removing the added content from Version 2, so there may be mistakes.

At the same time, if you don't specify the EggMoves here, the forms will inherit the egg moves of the original Pokémon.

Zigzagoon @ 5,500
Hatch @ 5,515
Linoone @ Level 100: 5,675
Shiny: No
Points: 70
Rattata @ 5,325
Hatch @ 5,340
Raticate @ Level 100: 5,500
Shiny: No
Points: 70
Natu @ 5,161
Hatch @ 5,176
Xatu @ Level 100: 5,321
Shiny: No
Points: 70
Buneary @ 5,064
Offered Fully-Raised @ 5,064
2022 Easter Community Pair Challenge
Shiny: Yes
Points: 250
Exeggcute @ 5,064
Offered Fully-Raised @ 5,064
2022 Easter Community Pair Challenge
Shiny: Yes
Points: 0
Girafarig @ 4,983
Hatch @ 4,998
Level 100: 5,158
Shiny: No
Points: 70

Looking for beta-testers and proof-readers for my fangame!

PorousMist326

Male
Seen 49 Minutes Ago
Posted 4 Days Ago
70 posts
1.8 Years
I made an adaptation for v19.1:
https://www.pokecommunity.com/showthread.php?t=470052

All credits go to StCooler and curryofthepast