The PokéCommunity Forums
The PokéCommunity Forums > Fan Games > Custom Game Development > Pokémon Essentials
Custom Scripts Question Gen VII Scripts (Z-Moves, Abilities and Moves,)

Notices
For all updates, view the main page.

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 November 12th, 2016 (7:59 AM).
TheShinyMew's Avatar
TheShinyMew TheShinyMew is offline
Pokémon and Konami games don't mix!
 
Join Date: May 2010
Location: Generation City
Age: 26
Gender: Female
Nature: Hardy
Posts: 108
Send a message via Skype™ to TheShinyMew
Hi! I am wondering if you could do abilities and moves from the Pokémon Sun and Moon games (like the ability Liquid Voice and Laser Focus) and a possible thing to make Z-Moves in Pokémon Essentials v16.2 as well? Just wondering.

I'm trying to do Liquid Voice, which turns Sound-based moves into Water-type moves. Here's the code:
Code:
      elsif thismove.isSoundBased?
         if attacker.hasWorkingAbility(:LIQUIDVOICE) && hasConst?(PBTypes,:WATER)
          type=getConst(PBTypes,:WATER)
          @powerboost=true
        end
      end
When Ii compiled it, it gave me an error. Is there anything wrong with it? Thank you in advance!
__________________
How much is that Mewtwo in the window?
Reply With Quote

Relevant Advertising!

  #2    
Old November 12th, 2016 (12:06 PM).
Rot8er_ConeX's Avatar
Rot8er_ConeX Rot8er_ConeX is offline
 
Join Date: May 2015
Location: The Dissa Region
Gender: Male
Posts: 765
1.) Liquid Voice does not give the power boost that Pixilate et. al. gives.
2.) Does the function isSoundBased? exist?
__________________
Features of Pokemon Entropy

The black circular "doodles" in the lower right corner of my avatar are actually my username written in Gallifreyan. Yes I'm a Whovian.
Reply With Quote
  #3    
Old November 12th, 2016 (8:15 PM).
James Davy James Davy is offline
 
Join Date: Oct 2014
Gender: Male
Posts: 53
In PokeBattle_Move, def pbTypeModifier after the otype lines, use this code for Liquid Voice:
Code:
    if attacker.hasWorkingAbility(:LIQUIDVOICE) && isSoundBased?
      atype=getConst(PBTypes,:WATER) || 0
    end
For Laser Focus, we don't know yet if the use of a status move in the next turn would cancel the effect or not. As for Z-Moves, fully implementing them would require a lot of coding.
Reply With Quote
  #4    
Old November 12th, 2016 (11:06 PM). Edited November 28th, 2016 by Rot8er_ConeX.
Rot8er_ConeX's Avatar
Rot8er_ConeX Rot8er_ConeX is offline
 
Join Date: May 2015
Location: The Dissa Region
Gender: Male
Posts: 765
Quote:
Originally Posted by James Davy View Post
As for Z-Moves, fully implementing them would require a lot of coding.
:D

I've actually implemented them into my game, but am still working on the Z-Status moves. It required editing the Compiler scripts, so if we add them, resources for base Essentials might become incompatible.

Spoiler:
Just to show I'm not blowing hot air, here's the code for in battle.

Code:
class PokeBattle_ZMove < PokeBattle_Move
  def pbEffect(attacker,opponent,hitnum=0,alltargets=nil,showanimation=true)
    movedata=PBZMoveData.new(@id)
    className=sprintf("PokeBattle_Move_%03X",movedata.function)
    if Object.const_defined?(className) && movedata.function != 0x0 # Unique Z-Moves
      ret=Kernel.const_get(className).new(@battle,PBMove.new(0))
      ret.zmove=true
      return ret.pbEffect(attacker,opponent,hitnum,alltargets,showanimation)
    elsif @category==3 && @basemove != nil
      if @basemove.basedamage>0
        return super(attacker,opponent,hitnum,alltargets,showanimation)
      elsif isConst?(@basemove.id,PBMoves,:NATUREPOWER) # Z-Nature Power
        className2="PokeBattle_Move_1AC"
        ret=Kernel.const_get(className2).new(@battle,PBMove.new(0))
        ret.zmove=false
        return ret.pbEffect(attacker,opponent,hitnum,alltargets,showanimation)
      elsif isConst?(@basemove.id,PBMoves,:MIRRORMOVE) # Z-Mirror Move
        className2="PokeBattle_Move_1AE"
        ret=Kernel.const_get(className2).new(@battle,PBMove.new(0))
        ret.zmove=false
        return ret.pbEffect(attacker,opponent,hitnum,alltargets,showanimation)
      elsif isConst?(@basemove.id,PBMoves,:COPYCAT) # Z-Copycat
        className2="PokeBattle_Move_1AF"
        ret=Kernel.const_get(className2).new(@battle,PBMove.new(0))
        ret.zmove=false
        return ret.pbEffect(attacker,opponent,hitnum,alltargets,showanimation)
      elsif isConst?(@basemove.id,PBMoves,:MEFIRST) # Z-Me First
        className2="PokeBattle_Move_1B0"
        ret=Kernel.const_get(className2).new(@battle,PBMove.new(0))
        ret.zmove=false
        return ret.pbEffect(attacker,opponent,hitnum,alltargets,showanimation)
      elsif isConst?(@basemove.id,PBMoves,:SLEEPTALK) # Z-Sleep Talk
        className2="PokeBattle_Move_1B1"
        ret=Kernel.const_get(className2).new(@battle,PBMove.new(0))
        ret.zmove=false
        return ret.pbEffect(attacker,opponent,hitnum,alltargets,showanimation)
      elsif @basemove.category==2 # other Status Z-Moves
        className2=sprintf("PokeBattle_Move_%03X",@basemove.zfunction)
        className3=sprintf("PokeBattle_Move_%03X",@basemove.function)
        ret=Kernel.const_get(className2).new(@battle,PBMove.new(0))
        ret.zmove=true
        bob=ret.pbEffect(attacker,opponent,hitnum,alltargets,showanimation)
        ret=Kernel.const_get(className3).new(@battle,PBMove.new(0))
        ret.zmove=false
        return ret.pbEffect(attacker,opponent,hitnum,alltargets,showanimation)
      end
    end
  end
  
  def pbAdditionalEffect(attacker,opponent)
    movedata=PBZMoveData.new(@id)
    className=sprintf("PokeBattle_Move_%03X",movedata.function)
    if Object.const_defined?(className) && movedata.function != 0x0
      ret=Kernel.const_get(className).new(@battle,PBMove.new(0))
      return ret.pbAdditionalEffect(attacker,opponent)
    else
      return super(attacker,opponent)
    end
  end
  
  def pbAccuracyCheck(attacker,opponent)
    movedata=PBZMoveData.new(@id)
    className=sprintf("PokeBattle_Move_%03X",movedata.function)
    if Object.const_defined?(className) && movedata.function != 0x0
      ret=Kernel.const_get(className).new(@battle,PBMove.new(0))
      return ret.pbAccuracyCheck(attacker,opponent)
    else
      return super(attacker,opponent)
    end
  end
  
  def pbModifyDamage(damagemult,attacker,opponent)
    movedata=PBZMoveData.new(@id)
    className=sprintf("PokeBattle_Move_%03X",movedata.function)
    if Object.const_defined?(className) && movedata.function != 0x0
      ret=Kernel.const_get(className).new(@battle,PBMove.new(0))
      return ret.pbModifyDamage(damagemult,attacker,opponent)
    else
      return super(damagemult,attacker,opponent)
    end
  end
  
  def pbBaseDamage(basedmg,attacker,opponent)
    movedata=PBZMoveData.new(@id)
    className=sprintf("PokeBattle_Move_%03X",movedata.function)
    if Object.const_defined?(className) && movedata.function != 0x0
      ret=Kernel.const_get(className).new(@battle,PBMove.new(0))
      return ret.pbBaseDamage(basedmg,attacker,opponent)
    else
      return super(basedmg,attacker,opponent)
    end
  end
  
  def pbBaseDamageMultiplier(damagemult,attacker,opponent)
    movedata=PBZMoveData.new(@id)
    className=sprintf("PokeBattle_Move_%03X",movedata.function)
    if Object.const_defined?(className) && movedata.function != 0x0
      ret=Kernel.const_get(className).new(@battle,PBMove.new(0))
      return ret.pbModifyDamage(damagemult,attacker,opponent)
    else
      return super(damagemult,attacker,opponent)
    end
  end
  
  def flingarray
    movedata=PBZMoveData.new(@id)
    className=sprintf("PokeBattle_Move_%03X",movedata.function)
    if Object.const_defined?(className) && movedata.function != 0x0
      ret=Kernel.const_get(className).new(@battle,PBMove.new(0))
      return ret.flingarray
    else
      return nil
    end
  end
  
  def pbCalcDamage(attacker,opponent,options=0,hitnum=0)
    movedata=PBZMoveData.new(@id)
    className=sprintf("PokeBattle_Move_%03X",movedata.function)
    if Object.const_defined?(className) && movedata.function != 0x0
      ret=Kernel.const_get(className).new(@battle,PBMove.new(0))
      return pbCalcDamage(attacker,opponent,options,hitnum)
    else
      return super(attacker,opponent,options,hitnum)
    end
  end
  
  def isZMove?
    return @zmove
  end

  def initialize(battle,move,submove=nil)
    @id = move.id
    @battle = battle
    @name = (PBZMoves.getName(id) rescue nil)   # Get the move's name
    # Get data on the move
    movedata = PBZMoveData.new(id)
    @function   = movedata.function
    @basedamage = movedata.basedamage
    @type       = movedata.type
    @accuracy   = movedata.accuracy
    @addlEffect = movedata.addlEffect
    @target     = movedata.target
    @priority   = movedata.priority
    @flags      = movedata.flags
    @category   = movedata.category
    @thismove   = move
    @pp         = move.pp   # Can be changed with Mimic/Transform
    @basemove   = nil
    @zmove      = true
    if submove != nil
      @basemove = PokeBattle_Move.pbFromPBMove(battle,submove)
      if @category==3 && @basemove.category==2 # Type-based status Z-Moves
        @function = @basemove.function
        @target   = @basemove.target
        @priority = @basemove.priority
        @flags    = @basemove.flags
        @thismove = @basemove.thismove
      end
    end
  end
end

class PokeBattle_Move
  def zFunction
    if [getID(PBMoves,:ASSIST),getID(PBMoves,:HEALINGWISH),
        getID(PBMoves,:METRONOME),getID(PBMoves,:LUNARDANCE)].include?(self.id)
      return 0x0 # no effect
    elsif [getID(PBMoves,:BULKUP),getID(PBMoves,:HONECLAWS),
           getID(PBMoves,:HOWL),getID(PBMoves,:LASERFOCUS),
           getID(PBMoves,:LEER),getID(PBMoves,:MEDITATE),
           getID(PBMoves,:ODORSLEUTH),getID(PBMoves,:POWERTRICK),
           getID(PBMoves,:ROTOTILLER),getID(PBMoves,:SCREECH),
           getID(PBMoves,:SHARPEN),getID(PBMoves,:TAILWHIP),
           getID(PBMoves,:TAUNT),getID(PBMoves,:TOPSYTURVY),
           getID(PBMoves,:WILLOWISP),getID(PBMoves,:WORKUP),
           getID(PBMoves,:HUNDREDARROWS),getID(PBMoves,:CORROSION),
           getID(PBMoves,:RALLYATTACK)].include?(self.id)
      return 0x1C # Raise Attack by 1
    elsif [getID(PBMoves,:MIRRORMOVE)].include?(self.id)
      return 0x2E # Raise Attack by 2
    elsif [getID(PBMoves,:SPLASH)].include?(self.id)
      return 0x1A8 # Raise Attack by 3
    elsif [getID(PBMoves,:AQUARING),getID(PBMoves,:BABYDOLLEYES),
           getID(PBMoves,:BANEFULBUNKER),getID(PBMoves,:BLOCK),
           getID(PBMoves,:CHARM),getID(PBMoves,:DEFENDORDER),
           getID(PBMoves,:FAIRYLOCK),getID(PBMoves,:FEATHERDANCE),
           getID(PBMoves,:FLOWERSHIELD),getID(PBMoves,:GRASSYTERRAIN),
           getID(PBMoves,:GROWL),getID(PBMoves,:HARDEN),
           getID(PBMoves,:MATBLOCK),getID(PBMoves,:NOBLEROAR),
           getID(PBMoves,:PAINSPLIT),getID(PBMoves,:PLAYNICE),
           getID(PBMoves,:POISONGAS),getID(PBMoves,:POISONPOWDER),
           getID(PBMoves,:QUICKGUARD),getID(PBMoves,:REFLECT),
           getID(PBMoves,:ROAR),getID(PBMoves,:SPIDERWEB),
           getID(PBMoves,:SPIKES),getID(PBMoves,:SPIKYSHIELD),
           getID(PBMoves,:STEALTHROCK),getID(PBMoves,:STRENGTHSAP),
           getID(PBMoves,:TEARFULLOK),getID(PBMoves,:TICKLE),
           getID(PBMoves,:TORMENT),getID(PBMoves,:TOXIC),
           getID(PBMoves,:TOXICSPIKES),getID(PBMoves,:VENOMDRENCH),
           getID(PBMoves,:WIDEGUARD),getID(PBMoves,:WITHDRAW),
           getID(PBMoves,:LIVEWIRE),getID(PBMoves,:OILSPILL),
           getID(PBMoves,:TRIDEECHESS),getID(PBMoves,:RALLYDEFENSE)].include?(self.id)
      return 0x1D # Raise Defense by 1
    elsif [getID(PBMoves,:CONFUSERAY),getID(PBMoves,:ELECTRIFY),
           getID(PBMoves,:EMBARGO),getID(PBMoves,:FAKETEARS),
           getID(PBMoves,:GEARUP),getID(PBMoves,:GRAVITY),
           getID(PBMoves,:GROWTH),getID(PBMoves,:INSTRUCT),
           getID(PBMoves,:IONDELUGE),getID(PBMoves,:METALSOUND),
           getID(PBMoves,:MINDREADER),getID(PBMoves,:MIRACLEEYE),
           getID(PBMoves,:NIGHTMARE),getID(PBMoves,:PSYCHICTERRAIN),
           getID(PBMoves,:REFLECTTYPE),getID(PBMoves,:SIMPLEBEAK),
           getID(PBMoves,:SOAK),getID(PBMoves,:SWEETKISS),
           getID(PBMoves,:TEETERDANCE),getID(PBMoves,:TELEKINESIS),
           getID(PBMoves,:SHRINK),getID(PBMoves,:MEDUSA),
           getID(PBMoves,:MUDCOAT),getID(PBMoves,:POLLENDELUGE),
           getID(PBMoves,:DUSTDELUGE),getID(PBMoves,:FLARE),
           getID(PBMoves,:RALLYSPATK)].include?(self.id)
      return 0x20 # Raise Special Attack by 1
    elsif [getID(PBMoves,:HEALBLOCK),getID(PBMoves,:PSYCHOSHIFT)].include?(self.id)
      return 0x32 # Raise Special Attack by 2
    elsif [getID(PBMoves,:CHARGE),getID(PBMoves,:CONFIDE),
           getID(PBMoves,:COSMICPOWER),getID(PBMoves,:CRAFTYSHIELD),
           getID(PBMoves,:EERIEIMPULSE),getID(PBMoves,:ENTRAINMENT),
           getID(PBMoves,:FLATTER),getID(PBMoves,:GLARE),
           getID(PBMoves,:INGRAIN),getID(PBMoves,:LIGHTSCREEN),
           getID(PBMoves,:MAGICROOM),getID(PBMoves,:MAGNETICFLUX),
           getID(PBMoves,:MEANLOOK),getID(PBMoves,:MISTYTERRAIN),
           getID(PBMoves,:MUDSPORT),getID(PBMoves,:SPOTLIGHT),
           getID(PBMoves,:STUNSPORE),getID(PBMoves,:THUNDERWAVE),
           getID(PBMoves,:WATERSPORT),getID(PBMoves,:WHIRLWIND),
           getID(PBMoves,:WISH),getID(PBMoves,:WONDERROOM),
           getID(PBMoves,:RALLYSPDEF)].include?(self.id)
      return 0x20 # Raise Special Defense by 1
    elsif [getID(PBMoves,:AROMATICMIST),getID(PBMoves,:CAPTIVATE),
           getID(PBMoves,:IMPRISON),getID(PBMoves,:MAGICCOAT),
           getID(PBMoves,:POWDER)].include?(self.id)
      return 0x33 # Raise Special Defense by 2
    elsif [getID(PBMoves,:AFTERYOU),getID(PBMoves,:AURORAVEIL),
           getID(PBMoves,:ELECTRICTERRAIN),getID(PBMoves,:ENCORE),
           getID(PBMoves,:GASTROACID),getID(PBMoves,:GRASSWHISTLE),
           getID(PBMoves,:GUARDSPLIT),getID(PBMoves,:GUARDSWAP),
           getID(PBMoves,:HAIL),getID(PBMoves,:HYPNOSIS),
           getID(PBMoves,:LOCKON),getID(PBMoves,:LOVELYKISS),
           getID(PBMoves,:POWERSPLIT),getID(PBMoves,:POWERSWAP),
           getID(PBMoves,:QUASH),getID(PBMoves,:RAINDANCE),
           getID(PBMoves,:ROLEPLAY),getID(PBMoves,:SAFEGUARD),
           getID(PBMoves,:SANDSTORM),getID(PBMoves,:SCARYFACE),
           getID(PBMoves,:SING),getID(PBMoves,:SKILLSWAP),
           getID(PBMoves,:SLEEPPOWDER),getID(PBMoves,:SPEEDSWAP),
           getID(PBMoves,:STICKYWEB),getID(PBMoves,:STRINGSHOT),
           getID(PBMoves,:SUNNYDAY),getID(PBMoves,:SUPERSONIC),
           getID(PBMoves,:TOXICTHREAD),getID(PBMoves,:WORRYSEED),
           getID(PBMoves,:YAWN),getID(PBMoves,:PURITYPULSE),
           getID(PBMoves,:PIXIEDUST),getID(PBMoves,:RALLYSPEED)].include?(self.id)
      return 0x1F # Raise Speed by 1
    elsif [getID(PBMoves,:ALLYSWITCH),getID(PBMoves,:BESTOW),
           getID(PBMoves,:MEFIRST),getID(PBMoves,:RECYCLE),
           getID(PBMoves,:SNATCH),getID(PBMoves,:SWITCHEROO),
           getID(PBMoves,:TRICK)].include?(self.id)
      return 0x30 # Raise Speed by 2
    elsif [getID(PBMoves,:COPYCAT),getID(PBMoves,:DEFENSECURL),
           getID(PBMoves,:DEFOG),getID(PBMoves,:FOCUSENERGY),
           getID(PBMoves,:MIMIC),getID(PBMoves,:SWEETSCENT),
           getID(PBMoves,:TRICKROOM),getID(PBMoves,:RALLYACCURACY)].include?(self.id)
      return 0x1A9 # Raise Accuracy by 1
    elsif [getID(PBMoves,:CAMOFLAGE),getID(PBMoves,:DETECT),
           getID(PBMoves,:FLASH),getID(PBMoves,:KINESIS),
           getID(PBMoves,:LUCKYCHANT),getID(PBMoves,:MAGNETRISE),
           getID(PBMoves,:SANDATTACK),getID(PBMoves,:SMOKESCREEN),
           getID(PBMoves,:SNOWATTACK),getID(PBMoves,:POLLENATTACK),
           getID(PBMoves,:RALLYEVASION)].include?(self.id)
      return 0x30 # Raise Evasion by 1
    elsif [getID(PBMoves,:CELEBRATE),getID(PBMoves,:CONVERSION),
           getID(PBMoves,:FORESTSCURSE),getID(PBMoves,:GEOMANCY),
           getID(PBMoves,:HAPPYHOUR),getID(PBMoves,:HOLDHANDS),
           getID(PBMoves,:PURIFY),getID(PBMoves,:SKETCH),
           getID(PBMoves,:TRICKORTREAT),getID(PBMoves,:ORIGINPOINT),
           getID(PBMoves,:LEVIOSA),getID(PBMoves,:IONSTORM),
           getID(PBMoves,:IMPUREAIR),getID(PBMoves,:RALLYSPECTRUM)].include?(self.id)
      return 0x2D # Raise all stats by 1
    elsif [getID(PBMoves,:ACCUPRESSURE),getID(PBMoves,:FORESIGHT),
           getID(PBMoves,:HEARTSWAP),getID(PBMoves,:SLEEPTALK),
           getID(PBMoves,:TAILWIND)].include?(self.id)
      return 0x23 # Raise critical hit ratio
    elsif [getID(PBMoves,:AROMATHERAPY),getID(PBMoves,:BELLYDRUM),
           getID(PBMoves,:CONVERSION2),getID(PBMoves,:HAZE),
           getID(PBMoves,:HEALBELL),getID(PBMoves,:MIST),
           getID(PBMoves,:PSYCHUP),getID(PBMoves,:REFRESH),
           getID(PBMoves,:SPITE),getID(PBMoves,:STOCKPILE),
           getID(PBMoves,:TELEPORT),getID(PBMoves,:TRANSFORM),
           getID(PBMoves,:GENETICMEMORY)].include?(self.id)
      return 0x1AB # Refills user's health fully
    elsif [getID(PBMoves,:MEMENTO),getID(PBMoves,:PARTINGSHOT)].include?(self.id)
      return 0x1A7 # Refills user's replacement's HP fully
    elsif [getID(PBMoves,:DESTINYBOND),getID(PBMoves,:GRUDGE)].include?(self.id)
      return 0x117 # Becomes center of attention
    elsif isConst?(self.id,PBMoves,:CURSE)
      return 0x1AD # Refills user's HP fully if user is Ghost type, otherwise raises Attack by 1
    elsif self.category==2
      return 0x50 # Resets user's stat changes
    end
  end
end
And Extreme EvoBoost, which I made forced-exclusive to Eevee until I knew for certain:

Code:
################################################################################
# Increases the user's Attack, Defense, Speed, Special Attack and Special Defense
# by 2 stages each.
# Fails if the user is not Eevee.
################################################################################
class PokeBattle_Move_195 < PokeBattle_Move
  def pbEffect(attacker,opponent,hitnum=0,alltargets=nil,showanimation=true)
    if !isConst?(attacker.species,PBSpecies,:EEVEE)
      @battle.pbDisplay(_INTL("But {1} doesn't have enough evolutionary potential to use this move!",
         attacker.pbThis))
      return -1
    end
    if !attacker.pbCanIncreaseStatStage?(PBStats::SPATK,false,attacker) &&
       !attacker.pbCanIncreaseStatStage?(PBStats::SPDEF,false,attacker) &&
       !attacker.pbCanIncreaseStatStage?(PBStats::ATTACK,false,attacker) &&
       !attacker.pbCanIncreaseStatStage?(PBStats::DEFENSE,false,attacker) &&
       !attacker.pbCanIncreaseStatStage?(PBStats::SPEED,false,attacker)
      return -1
    end
    showanim=true
    dispdouble=false
    if attacker.pbCanIncreaseStatStage?(PBStats::SPATK,false,attacker) &&
       attacker.pbCanIncreaseStatStage?(PBStats::SPDEF,false,attacker)
      dispdouble=true
    end
    if attacker.pbCanIncreaseStatStage?(PBStats::ATTACK,false,attacker)
      attacker.pbIncreaseStat(PBStats::ATTACK,2,true,showanim,attacker)
      showanim=false
    end
    if attacker.pbCanIncreaseStatStage?(PBStats::DEFENSE,false,attacker)
      attacker.pbIncreaseStat(PBStats::DEFENSE,2,true,showanim,attacker)
      showanim=false
    end
    if attacker.pbCanIncreaseStatStage?(PBStats::SPATK,false,attacker)
      attacker.pbIncreaseStat(PBStats::SPATK,2,(@battle.gen != 1),showanim,attacker)
      showanim=false
    end
    if attacker.pbCanIncreaseStatStage?(PBStats::SPDEF,false,attacker)
      attacker.pbIncreaseStat(PBStats::SPDEF,2,(@battle.gen != 1),showanim,attacker)
      showanim=false
    end
    if @battle.gen==1 && dispdouble
      @battle.pbDisplay(_INTL("{1}'s Special went way up!",attacker.pbThis))
    elsif @battle.gen==1
      @battle.pbDisplay(_INTL("{1}'s Special rose sharply!",attacker.pbThis))
    end
    if attacker.pbCanIncreaseStatStage?(PBStats::SPEED,false,attacker)
      attacker.pbIncreaseStat(PBStats::SPEED,2,true,showanim,attacker)
      showanim=false
    end
    return 0
  end
end
(note that my game has generation mechanics, so I have special messages in Gen I mode to say a Pokemon's "Special" went up instead of their SpAtk and their SpDef.)
__________________
Features of Pokemon Entropy

The black circular "doodles" in the lower right corner of my avatar are actually my username written in Gallifreyan. Yes I'm a Whovian.
Reply With Quote
  #5    
Old November 13th, 2016 (2:02 AM).
James Davy James Davy is offline
 
Join Date: Oct 2014
Gender: Male
Posts: 53
You're right on Extreme Evoboost being exclusive to the Eevee species. I get the feeling we'll be seeing Z-Moves in the next version of Essentials.
Reply With Quote
  #6    
Old November 13th, 2016 (11:19 AM).
Rot8er_ConeX's Avatar
Rot8er_ConeX Rot8er_ConeX is offline
 
Join Date: May 2015
Location: The Dissa Region
Gender: Male
Posts: 765
Quote:
Originally Posted by James Davy View Post
You're right on Extreme Evoboost being exclusive to the Eevee species.
Yes, but is it exclusive in name only (like most exclusive moves, so Smeargle can still use them if he Sketches them), or is it forced to not work if someone that isn't Eevee uses it (Like Chatot's Chatter, Hoopa-U's Hyperspace Fury, and now Darkrai's Dark Void)? I'm personally thinking the latter, because the animation.

Technically, the distinction isn't important on the player's end, because it's a Z-Move and therefore can't be Sketched, but as a developer, I like to know these things.

Quote:
I get the feeling we'll be seeing Z-Moves in the next version of Essentials.
Depends on if the next version is v16.3 or v17.0. If the former, I'm not sure if we'll see Z-Moves in it. If the latter, we probably will.
__________________
Features of Pokemon Entropy

The black circular "doodles" in the lower right corner of my avatar are actually my username written in Gallifreyan. Yes I'm a Whovian.
Reply With Quote
  #7    
Old November 17th, 2016 (11:23 PM).
TheShinyMew's Avatar
TheShinyMew TheShinyMew is offline
Pokémon and Konami games don't mix!
 
Join Date: May 2010
Location: Generation City
Age: 26
Gender: Female
Nature: Hardy
Posts: 108
Send a message via Skype™ to TheShinyMew
What about Pollen Puff's effect (The user attacks the enemy with a pollen puff that explodes. If the target is an ally, it gives the ally a pollen puff that restores its HP instead.) or the Spectral Thief (The user hides in the target's shadow, steals the target's stat boosts, and then attacks.)?
__________________
How much is that Mewtwo in the window?
Reply With Quote
  #8    
Old November 18th, 2016 (8:18 AM).
Rot8er_ConeX's Avatar
Rot8er_ConeX Rot8er_ConeX is offline
 
Join Date: May 2015
Location: The Dissa Region
Gender: Male
Posts: 765
Quote:
Originally Posted by TheShinyMew View Post
What about Pollen Puff's effect (The user attacks the enemy with a pollen puff that explodes. If the target is an ally, it gives the ally a pollen puff that restores its HP instead.) or the Spectral Thief (The user hides in the target's shadow, steals the target's stat boosts, and then attacks.)?
I haven't done Pollen Puff yet, but here's Spectral Thief:

Code:
################################################################################
# Steals target's stat boosts, then attacks
################################################################################
class PokeBattle_Move_1A1 < PokeBattle_Move
  def pbEffect(attacker,opponent,hitnum=0,alltargets=nil,showanimation=true)
    if opponent.stages[1]>0 || opponent.stages[2]>0 || opponent.stages[3]>0 ||
       opponent.stages[4]>0 || opponent.stages[5]>0 || opponent.stages[6]>0 ||
       opponent.stages[7]>0
      stolenstats=[0,0,0,0,0,0,0,0]
      for i in 0...8
        stolenstats[i]=opponent.stages[i]*1 if opponent.stages[i]>0
        opponent.stages[i]=0 if opponent.stages[i]>0
      end
      @battle.pbDisplay(_INTL("{1} stole {2}'s stat boosts!",attacker.pbThis,opponent.pbThis(true)))
      showanim=true
      for i in 0...6
        if attacker.pbCanIncreaseStatStage?(i,true,attacker) && stolenstats[i]>0
          attacker.pbIncreaseStat(i,stolenstats[i],true,showanim,attacker)
          showanim=false
        end
      end
    end
    # actually attack now
    ret=super(attacker,opponent,hitnum,alltargets,showanimation)
    return ret
  end
end
__________________
Features of Pokemon Entropy

The black circular "doodles" in the lower right corner of my avatar are actually my username written in Gallifreyan. Yes I'm a Whovian.
Reply With Quote
  #9    
Old November 21st, 2016 (10:41 AM).
TheShinyMew's Avatar
TheShinyMew TheShinyMew is offline
Pokémon and Konami games don't mix!
 
Join Date: May 2010
Location: Generation City
Age: 26
Gender: Female
Nature: Hardy
Posts: 108
Send a message via Skype™ to TheShinyMew
What about giving different Evolution stones, Pokemon egg groups and egg moves depending on a forme? Alolan Pokemon can do that.
__________________
How much is that Mewtwo in the window?
Reply With Quote
  #10    
Old November 23rd, 2016 (2:29 AM).
PIMOC PIMOC is offline
 
Join Date: Jul 2016
Gender: Male
Posts: 15
I don't know if it's impolite to ask such thing, but have one of you created a script for the move "Stomping Tantrum?" I'm trying to implement some of the new moves (only a few, the ones learnable by the Pokémon of previous generations), but I have no knowledge at all about scripting and such. The other moves I could "combine" previous existing ones (although I'm pretty sure I made a lot of mistakes, they seem to be working so far - so far), but Stomping Tantrum is quite different. I don't know if the game records whether the user's previous move failed or not, and neither how to "call" that information, since no other move does that kind of thing.
Thanks in advance!
Reply With Quote
  #11    
Old November 24th, 2016 (7:26 AM). Edited November 24th, 2016 by James Davy.
James Davy James Davy is offline
 
Join Date: Oct 2014
Gender: Male
Posts: 53
Quote:
Originally Posted by PIMOC View Post
I don't know if it's impolite to ask such thing, but have one of you created a script for the move "Stomping Tantrum?" I'm trying to implement some of the new moves (only a few, the ones learnable by the Pokémon of previous generations), but I have no knowledge at all about scripting and such. The other moves I could "combine" previous existing ones (although I'm pretty sure I made a lot of mistakes, they seem to be working so far - so far), but Stomping Tantrum is quite different. I don't know if the game records whether the user's previous move failed or not, and neither how to "call" that information, since no other move does that kind of thing.
Thanks in advance!
How I would approach this one is to create a new PBEffect called LastMoveFailed, initialise it in PokeBattle_Battler as false and in PokeBattle_Battler, def pbProcessMoveAgainstTarget add this line:
Code:
      # Check success (accuracy/evasion calculation)
      if !nocheck &&
         !pbSuccessCheck(thismove,user,target,i==0 || thismove.function==0xBF) # Triple Kick
        if thismove.function==0xBF && realnumhits>0   # Triple Kick
          break   # Considered a success if Triple Kick hits at least once
        elsif thismove.function==0x10B   # Hi Jump Kick, Jump Kick
          #TODO: Not shown if message is "It doesn't affect XXX..."
          PBDebug.log("[#{user.pbThis} took crash damage]")
          @battle.pbDisplay(_INTL("{1} kept going and crashed!",user.pbThis))
          damage=[1,(user.totalhp/2).floor].max
          if damage>0
            @battle.scene.pbDamageAnimation(user,0)
            user.pbReduceHP(damage)
          end
          user.pbFaint if user.isFainted?
        #elsif parentalbond && realnumhits==0
        #  break
        end
        user.effects[PBEffects::Outrage]=0 if thismove.function==0xD2 # Outrage
        user.effects[PBEffects::Rollout]=0 if thismove.function==0xD3 # Rollout
        user.effects[PBEffects::FuryCutter]=0 if thismove.function==0x91 # Fury Cutter
        user.effects[PBEffects::EchoedVoice]=0 if thismove.function==0x92 # Echoed Voice
        user.effects[PBEffects::Stockpile]=0 if thismove.function==0x113 # Spit Up
        user.effects[PBEffects::LastMoveFailed]=true
        return
      end
Replace this line:
Code:
      return if numhits>1 && target.damagestate.calcdamage<=0
With:
Code:
      if numhits>1 && target.damagestate.calcdamage<=0
        user.effects[PBEffects::LastMoveFailed]=true
        return
      end

Add this line as the very last line in PokeBattle_Battler, def pbProcessMoveAgainstTarget:
Code:
user.effects[PBEffects::LastMoveFailed]=false
In PokeBattle_MoveEffects, create a new function code and add this code:
Code:
  def pbBaseDamage(basedmg,attacker,opponent)
    return basedmg*2 if attacker.effects[PBEffects::LastMoveFailed]
    return basedmg
  end
No pbEffect function is necessary for that one.
Reply With Quote
  #12    
Old November 24th, 2016 (11:51 AM).
PIMOC PIMOC is offline
 
Join Date: Jul 2016
Gender: Male
Posts: 15
Quote:
Originally Posted by James Davy View Post
How I would approach this one is to create a new PBEffect called LastMoveFailed, initialise it in PokeBattle_Battler as false and in PokeBattle_Battler, def pbProcessMoveAgainstTarget add this line:
Code:
      # Check success (accuracy/evasion calculation)
      if !nocheck &&
         !pbSuccessCheck(thismove,user,target,i==0 || thismove.function==0xBF) # Triple Kick
        if thismove.function==0xBF && realnumhits>0   # Triple Kick
          break   # Considered a success if Triple Kick hits at least once
        elsif thismove.function==0x10B   # Hi Jump Kick, Jump Kick
          #TODO: Not shown if message is "It doesn't affect XXX..."
          PBDebug.log("[#{user.pbThis} took crash damage]")
          @battle.pbDisplay(_INTL("{1} kept going and crashed!",user.pbThis))
          damage=[1,(user.totalhp/2).floor].max
          if damage>0
            @battle.scene.pbDamageAnimation(user,0)
            user.pbReduceHP(damage)
          end
          user.pbFaint if user.isFainted?
        #elsif parentalbond && realnumhits==0
        #  break
        end
        user.effects[PBEffects::Outrage]=0 if thismove.function==0xD2 # Outrage
        user.effects[PBEffects::Rollout]=0 if thismove.function==0xD3 # Rollout
        user.effects[PBEffects::FuryCutter]=0 if thismove.function==0x91 # Fury Cutter
        user.effects[PBEffects::EchoedVoice]=0 if thismove.function==0x92 # Echoed Voice
        user.effects[PBEffects::Stockpile]=0 if thismove.function==0x113 # Spit Up
        user.effects[PBEffects::LastMoveFailed]=true
        return
      end
Replace this line:
Code:
      return if numhits>1 && target.damagestate.calcdamage<=0
With:
Code:
      if numhits>1 && target.damagestate.calcdamage<=0
        user.effects[PBEffects::LastMoveFailed]=true
        return
      end

Add this line as the very last line in PokeBattle_Battler, def pbProcessMoveAgainstTarget:
Code:
user.effects[PBEffects::LastMoveFailed]=false
In PokeBattle_MoveEffects, create a new function code and add this code:
Code:
  def pbBaseDamage(basedmg,attacker,opponent)
    return basedmg*2 if attacker.effects[PBEffects::LastMoveFailed]
    return basedmg
  end
No pbEffect function is necessary for that one.
Thank you so much! It seems to be working, so far! Now all that's left for me is that tricky Laser Focus.
Reply With Quote
  #13    
Old November 24th, 2016 (12:17 PM).
Rot8er_ConeX's Avatar
Rot8er_ConeX Rot8er_ConeX is offline
 
Join Date: May 2015
Location: The Dissa Region
Gender: Male
Posts: 765
Quote:
Originally Posted by PIMOC View Post
Thank you so much! It seems to be working, so far! Now all that's left for me is that tricky Laser Focus.
Code:
################################################################################
# The user's next move will be a critical hit
################################################################################
class PokeBattle_Move_19A < PokeBattle_Move
  def pbEffect(attacker,opponent,hitnum=0,alltargets=nil,showanimation=true)
    attacker.effects[PBEffects::LaserFocus]=2
    @battle.pbDisplay(_INTL("{1} began focusing hard!",attacker.pbThis))
    return 0
  end
end
Code:
  
  def pbIsCritical?(attacker,opponent)
    if opponent.hasWorkingAbility(:SHELLARMOR) && !attacker.hasBypassingAbility 
      return false
    end
    return false if opponent.pbOwnSide.effects[PBEffects::LuckyChant]>0
    return true if @function==0xA0 # Frost Breath
    return true if attacker.hasWorkingAbility(:MERCILESS) && opponent.status==PBStatus::POISON
    return true if attacker.effects[PBEffects::LaserFocus]>0




The one that's going to give me trouble is Core Enforcer. I need to figure out how to tell if the opponent has used this turn, then give them the GastroAcid effect if they have.
__________________
Features of Pokemon Entropy

The black circular "doodles" in the lower right corner of my avatar are actually my username written in Gallifreyan. Yes I'm a Whovian.
Reply With Quote
  #14    
Old November 24th, 2016 (2:44 PM).
PIMOC PIMOC is offline
 
Join Date: Jul 2016
Gender: Male
Posts: 15
Quote:
Originally Posted by Rot8er_ConeX View Post
Code:
################################################################################
# The user's next move will be a critical hit
################################################################################
class PokeBattle_Move_19A < PokeBattle_Move
  def pbEffect(attacker,opponent,hitnum=0,alltargets=nil,showanimation=true)
    attacker.effects[PBEffects::LaserFocus]=2
    @battle.pbDisplay(_INTL("{1} began focusing hard!",attacker.pbThis))
    return 0
  end
end
Code:
  
  def pbIsCritical?(attacker,opponent)
    if opponent.hasWorkingAbility(:SHELLARMOR) && !attacker.hasBypassingAbility 
      return false
    end
    return false if opponent.pbOwnSide.effects[PBEffects::LuckyChant]>0
    return true if @function==0xA0 # Frost Breath
    return true if attacker.hasWorkingAbility(:MERCILESS) && opponent.status==PBStatus::POISON
    return true if attacker.effects[PBEffects::LaserFocus]>0




The one that's going to give me trouble is Core Enforcer. I need to figure out how to tell if the opponent has used this turn, then give them the GastroAcid effect if they have.
Thank you! You obviously know a lot about Scripting and I know nothing lol, but I created a "sort of" Core Enforcer. I took the functional code of Payback (since its Power doubles if the Target has already moved) and added the effect of Simple Beam to change the ability of the target tô something useless (Illuminate, for instance). Obviously is not elegant and it is far from accurate, but I suppose it works
Reply With Quote
  #15    
Old November 25th, 2016 (2:00 PM).
sonicfan7895 sonicfan7895 is offline
Sprite Inserter
 
Join Date: Dec 2010
Location: Golden/Denver, Colorado
Age: 19
Gender: Male
Nature: Serious
Posts: 74
Send a message via Yahoo to sonicfan7895 Send a message via Skype™ to sonicfan7895
I do have one thing I wanted to try... I've been trying to see if I can get Battle Bond to work in my game.

For me personally, I don't quite know how to implement it; I considered treating it like a Mega Evolution and checking to see if it has the ability Battle Bond, but it doesn't seem to be working at all.

Any tips? I can provide the codes I used relating to Battle Bond, unless someone has already implemented this in their game...
__________________
Check out my band: xSOBERDOSE!
On Facebook

Currently working on my short story, set in-between the events of Colosseum and XD, Orre's Return! Check out the thread by clicking on the highlighted words!

My favorite video game: Jade Cocoon 2!
Favorite Monster from Jade Cocoon 2: Delapon or Frogess
Favorite Move from Jade Cocoon 2: Dark Impact
Reply With Quote
  #16    
Old November 25th, 2016 (2:58 PM).
PIMOC PIMOC is offline
 
Join Date: Jul 2016
Gender: Male
Posts: 15
Quote:
Originally Posted by sonicfan7895 View Post
I do have one thing I wanted to try... I've been trying to see if I can get Battle Bond to work in my game.

For me personally, I don't quite know how to implement it; I considered treating it like a Mega Evolution and checking to see if it has the ability Battle Bond, but it doesn't seem to be working at all.

Any tips? I can provide the codes I used relating to Battle Bond, unless someone has already implemented this in their game...
Well, I can't stress this enough - I don't know anything about scripting. But I've managed to improvise a lot of things from the 7 gen to my game just by adjusting things that already existed. For Battle Bond, I guess (hope) you can create a new effect ("greninja" or something) and then copy the code from Moxie and make it activate this new effect whenever you make an enemy faint (instead of raising your attack, like Moxie does). Then you go to Pokebattle_Battler and copy the code from some Pokémon in the "def pbCheckForm", like Cherrim, and change the way that it activates (make the greninja effect being on, instead of the weather being sunny). I have no idea if that works, but it's an idea, I guess.
Reply With Quote
  #17    
Old November 26th, 2016 (6:33 AM).
James Davy James Davy is offline
 
Join Date: Oct 2014
Gender: Male
Posts: 53
Quote:
Originally Posted by PIMOC View Post
Well, I can't stress this enough - I don't know anything about scripting. But I've managed to improvise a lot of things from the 7 gen to my game just by adjusting things that already existed. For Battle Bond, I guess (hope) you can create a new effect ("greninja" or something) and then copy the code from Moxie and make it activate this new effect whenever you make an enemy faint (instead of raising your attack, like Moxie does). Then you go to Pokebattle_Battler and copy the code from some Pokémon in the "def pbCheckForm", like Cherrim, and change the way that it activates (make the greninja effect being on, instead of the weather being sunny). I have no idea if that works, but it's an idea, I guess.
It actually would work. Also, Soul Heart is a copy of Moxie only a different stat is boosted.
Reply With Quote
  #18    
Old November 26th, 2016 (2:02 PM).
Rot8er_ConeX's Avatar
Rot8er_ConeX Rot8er_ConeX is offline
 
Join Date: May 2015
Location: The Dissa Region
Gender: Male
Posts: 765
Quote:
Originally Posted by James Davy View Post
It actually would work. Also, Soul Heart is a copy of Moxie only a different stat is boosted.
Soul Heart is not a copy of Moxie. Moxie triggers only when you make an enemy faint. Soul Heart is triggered any time any Pokemon on the field faints.
__________________
Features of Pokemon Entropy

The black circular "doodles" in the lower right corner of my avatar are actually my username written in Gallifreyan. Yes I'm a Whovian.
Reply With Quote
  #19    
Old November 27th, 2016 (9:12 PM).
sonicfan7895 sonicfan7895 is offline
Sprite Inserter
 
Join Date: Dec 2010
Location: Golden/Denver, Colorado
Age: 19
Gender: Male
Nature: Serious
Posts: 74
Send a message via Yahoo to sonicfan7895 Send a message via Skype™ to sonicfan7895
Quote:
Originally Posted by Rot8er_ConeX View Post
Soul Heart is not a copy of Moxie. Moxie triggers only when you make an enemy faint. Soul Heart is triggered any time any Pokemon on the field faints.
So now that's cleared up, everything else PIMOC said in his reply is the way to do it? Can you confirm this? I don't mean to be doubtful, I'm sure a lot of people are curious about how it's done too...
__________________
Check out my band: xSOBERDOSE!
On Facebook

Currently working on my short story, set in-between the events of Colosseum and XD, Orre's Return! Check out the thread by clicking on the highlighted words!

My favorite video game: Jade Cocoon 2!
Favorite Monster from Jade Cocoon 2: Delapon or Frogess
Favorite Move from Jade Cocoon 2: Dark Impact
Reply With Quote
  #20    
Old November 27th, 2016 (10:27 PM).
Rot8er_ConeX's Avatar
Rot8er_ConeX Rot8er_ConeX is offline
 
Join Date: May 2015
Location: The Dissa Region
Gender: Male
Posts: 765
Quote:
Originally Posted by sonicfan7895 View Post
So now that's cleared up, everything else PIMOC said in his reply is the way to do it? Can you confirm this? I don't mean to be doubtful, I'm sure a lot of people are curious about how it's done too...
It's not how I made Battle Bond work, but theoretically it should work. (I made Battle Bond by altering some code I had written for a fake ability Galeforce like in Fire Emblem, so it's not quite useful to you guys.)
__________________
Features of Pokemon Entropy

The black circular "doodles" in the lower right corner of my avatar are actually my username written in Gallifreyan. Yes I'm a Whovian.
Reply With Quote
  #21    
Old November 28th, 2016 (11:40 PM). Edited November 28th, 2016 by Rot8er_ConeX.
Rot8er_ConeX's Avatar
Rot8er_ConeX Rot8er_ConeX is offline
 
Join Date: May 2015
Location: The Dissa Region
Gender: Male
Posts: 765
Pollen Puff
Code:
################################################################################
# If the target is an ally, heals the target for the amount of damage that would
#     have been dealt.  If target is an opponent, damages them normally.
################################################################################
class PokeBattle_Move_1B3 < PokeBattle_Move
  def pbEffect(attacker,opponent,hitnum=0,alltargets=nil,showanimation=true)
    if attacker.pbPartner != nil
      if attacker.pbPartner == opponent
        damage=pbCalcDamage(attacker,opponent,0,hitnum)
        opponent.pbRecoverHP(damage,true)
        return 0
      end
    end
    return super(attacker,opponent,hitnum,alltargets,showanimation)
  end
end
Floral Healing
Code:
################################################################################
# Heals target by 1/2 of its max HP.
# In Grassy Terrain, heals target by 3/4 of its max HP.
################################################################################
class PokeBattle_Move_1B4 < PokeBattle_Move
  def pbEffect(attacker,opponent,hitnum=0,alltargets=nil,showanimation=true)
    if opponent.effects[PBEffects::HealBlock]>0
      @battle.pbDisplay(_INTL("{1} can't use {2} because of Heal Block!",attacker.pbThis,name))
      return -1
    end
    if opponent.hp==opponent.totalhp
      @battle.pbDisplay(_INTL("{1}'s HP is full!",opponent.pbThis))
      return -1
    end
    pbShowAnimation(@id,attacker,opponent,hitnum,alltargets,showanimation)
    inc=0.5
    inc=0.75 if @battle.field.effects[PBEffects::GrassyTerrain]>0
    opponent.pbRecoverHP(((opponent.totalhp+1)*inc).floor,true)
    @battle.pbDisplay(_INTL("{1}'s HP was restored.",opponent.pbThis))
    return 0
  end
end
Strength Sap
Code:
################################################################################
# Heals the user for an amount equal to the target's effective Attack stat
# Lowers the target's Attack by 1 stage
################################################################################
class PokeBattle_Move_1B5 < PokeBattle_Move
  def pbEffect(attacker,opponent,hitnum=0,alltargets=nil,showanimation=true)
    if attacker.effects[PBEffects::HealBlock]>0
      bob="heal"
      bob=_INTL("use {1}",name) if !opponent.pbCanReduceStatStage?(PBStats::ATTACK,true,false,attacker)
      @battle.pbDisplay(_INTL("{1} can't {2} because of Heal Block!",attacker.pbThis,bob))
      return -1 if !opponent.pbCanReduceStatStage?(PBStats::ATTACK,true,false,attacker)
    elsif attacker.hp==attacker.totalhp
      @battle.pbDisplay(_INTL("{1}'s HP is full!",attacker.pbThis))
      return -1 if !opponent.pbCanReduceStatStage?(PBStats::ATTACK,true,false,attacker)
    else
      oatk=opponent.attack
      attacker.pbRecoverHP(oatk,true)
      @battle.pbDisplay(_INTL("{1}'s HP was restored.",attacker.pbThis))
    end
    if opponent.pbCanReduceStatStage?(PBStats::ATTACK,true,false,attacker)
      opponent.pbReduceStat(PBStats::ATTACK,1,true,true,false,attacker)
    end
    return 0
  end
end
Gear Up
Code:
################################################################################
# Gear Up
################################################################################
class PokeBattle_Move_1B6 < PokeBattle_Move
  def pbEffect(attacker,opponent,hitnum=0,alltargets=nil,showanimation=true)
    if attacker.pbPartner
      if attacker.pbPartner.hasWorkingAbility(:PLUS) ||
         attacker.pbPartner.hasWorkingAbility(:MINUS)
        anim=true
        if attacker.pbPartner.pbCanIncreaseStatStage?(PBStats::ATTACK,true)
          attacker.pbPartner.pbIncreaseStat(PBStats::ATTACK,1,true,anim)
          anim=false
        end
        if attacker.pbPartner.pbCanIncreaseStatStage?(PBStats::SPATK,true)
          attacker.pbPartner.pbIncreaseStat(PBStats::SPATK,1,true,anim)
        end
      end
    end
    return 0
  end
end
Speed Swap
Code:
################################################################################
# User and target swap their Speed stats
################################################################################
class PokeBattle_Move_1B7 < PokeBattle_Move
  def pbEffect(attacker,opponent,hitnum=0,alltargets=nil,showanimation=true)
    pbShowAnimation(@id,attacker,opponent,hitnum,alltargets,showanimation)
    attacker.speed,opponent.speed=opponent.speed,attacker.speed
    @battle.pbDisplay(_INTL("{1} switched their Speed stats!",attacker.pbThis))
    return 0
  end
end
Shore Up
Code:
################################################################################
# Heals user by 1/2 of its max HP.
# In a sandstorm, heals user by 3/4 of its max HP.
################################################################################
class PokeBattle_Move_1A3 < PokeBattle_Move
  def pbEffect(attacker,opponent,hitnum=0,alltargets=nil,showanimation=true)
    if attacker.effects[PBEffects::HealBlock]>0
      @battle.pbDisplay(_INTL("{1} can't use {2} because of Heal Block!",attacker.pbThis,name))
      return -1
    end
    if attacker.hp==attacker.totalhp
      @battle.pbDisplay(_INTL("{1}'s HP is full!",attacker.pbThis))
      return -1
    end
    pbShowAnimation(@id,attacker,nil,hitnum,alltargets,showanimation)
    inc=0.5
    inc=0.75 if @battle.pbWeather==PBWeather::SANDSTORM
    attacker.pbRecoverHP(((attacker.totalhp+1)*inc).floor,true)
    @battle.pbDisplay(_INTL("{1}'s HP was restored.",attacker.pbThis))
    return 0
  end
end
Spotlight
Code:
################################################################################
# This round, target becomes the target of attacks that have single targets.
################################################################################
class PokeBattle_Move_1A6 < PokeBattle_Move
  def pbEffect(attacker,opponent,hitnum=0,alltargets=nil,showanimation=true)
    if [email protected]
      @battle.pbDisplay(_INTL("But it failed!"))
      return -1
    end
    pbShowAnimation(@id,attacker,nil,hitnum,alltargets,showanimation)
    opponent.effects[PBEffects::FollowMe]=true
    if !opponent.pbPartner.isFainted?
      opponent.pbPartner.effects[PBEffects::FollowMe]=false
    end
    @battle.pbDisplay(_INTL("{1} shone a spotlight on {2}!",attacker.pbThis,opponent.pbThis))
    return 0
  end
end
Revelation Dance
Code:
################################################################################
# Move type changes based on user's primary type
################################################################################
class PokeBattle_Move_192 < PokeBattle_Move
  def pbType(type,attacker,opponent)
    return attacker.type1
  end
end
(originally had this one coded a lot more complicated, where it checks to be sure the attacker is Oricorio, then goes by the form's primary type. Turns out it goes by primary type regardless of species.)

Instruct
Code:
################################################################################
# Instructs the target to use the move it last used again.
################################################################################
class PokeBattle_Move_194 < PokeBattle_Move
  def pbEffect(attacker,opponent,hitnum=0,alltargets=nil,showanimation=true)
    if opponent.lastMoveUsed<=0 ||
       (PBMoveData.new(opponent.lastMoveUsed).flags&0x10)==0 # flag e: Copyable by Mirror Move
      @battle.pbDisplay(_INTL("The instruction failed!"))
      return -1
    end
    opponent.pbUseMoveSimple(opponent.lastMoveUsed,-1,opponent.index)
    return 0
  end
end
__________________
Features of Pokemon Entropy

The black circular "doodles" in the lower right corner of my avatar are actually my username written in Gallifreyan. Yes I'm a Whovian.
Reply With Quote
  #22    
Old November 29th, 2016 (10:51 AM).
PIMOC PIMOC is offline
 
Join Date: Jul 2016
Gender: Male
Posts: 15
Quote:
Originally Posted by Rot8er_ConeX View Post
Pollen Puff
Code:
################################################################################
# If the target is an ally, heals the target for the amount of damage that would
#     have been dealt.  If target is an opponent, damages them normally.
################################################################################
class PokeBattle_Move_1B3 < PokeBattle_Move
  def pbEffect(attacker,opponent,hitnum=0,alltargets=nil,showanimation=true)
    if attacker.pbPartner != nil
      if attacker.pbPartner == opponent
        damage=pbCalcDamage(attacker,opponent,0,hitnum)
        opponent.pbRecoverHP(damage,true)
        return 0
      end
    end
    return super(attacker,opponent,hitnum,alltargets,showanimation)
  end
end
Floral Healing
Code:
################################################################################
# Heals target by 1/2 of its max HP.
# In Grassy Terrain, heals target by 3/4 of its max HP.
################################################################################
class PokeBattle_Move_1B4 < PokeBattle_Move
  def pbEffect(attacker,opponent,hitnum=0,alltargets=nil,showanimation=true)
    if opponent.effects[PBEffects::HealBlock]>0
      @battle.pbDisplay(_INTL("{1} can't use {2} because of Heal Block!",attacker.pbThis,name))
      return -1
    end
    if opponent.hp==opponent.totalhp
      @battle.pbDisplay(_INTL("{1}'s HP is full!",opponent.pbThis))
      return -1
    end
    pbShowAnimation(@id,attacker,opponent,hitnum,alltargets,showanimation)
    inc=0.5
    inc=0.75 if @battle.field.effects[PBEffects::GrassyTerrain]>0
    opponent.pbRecoverHP(((opponent.totalhp+1)*inc).floor,true)
    @battle.pbDisplay(_INTL("{1}'s HP was restored.",opponent.pbThis))
    return 0
  end
end
Strength Sap
Code:
################################################################################
# Heals the user for an amount equal to the target's effective Attack stat
# Lowers the target's Attack by 1 stage
################################################################################
class PokeBattle_Move_1B5 < PokeBattle_Move
  def pbEffect(attacker,opponent,hitnum=0,alltargets=nil,showanimation=true)
    if attacker.effects[PBEffects::HealBlock]>0
      bob="heal"
      bob=_INTL("use {1}",name) if !opponent.pbCanReduceStatStage?(PBStats::ATTACK,true,false,attacker)
      @battle.pbDisplay(_INTL("{1} can't {2} because of Heal Block!",attacker.pbThis,bob))
      return -1 if !opponent.pbCanReduceStatStage?(PBStats::ATTACK,true,false,attacker)
    elsif attacker.hp==attacker.totalhp
      @battle.pbDisplay(_INTL("{1}'s HP is full!",attacker.pbThis))
      return -1 if !opponent.pbCanReduceStatStage?(PBStats::ATTACK,true,false,attacker)
    else
      oatk=opponent.attack
      attacker.pbRecoverHP(oatk,true)
      @battle.pbDisplay(_INTL("{1}'s HP was restored.",attacker.pbThis))
    end
    if opponent.pbCanReduceStatStage?(PBStats::ATTACK,true,false,attacker)
      opponent.pbReduceStat(PBStats::ATTACK,1,true,true,false,attacker)
    end
    return 0
  end
end
Gear Up
Code:
################################################################################
# Gear Up
################################################################################
class PokeBattle_Move_1B6 < PokeBattle_Move
  def pbEffect(attacker,opponent,hitnum=0,alltargets=nil,showanimation=true)
    if attacker.pbPartner
      if attacker.pbPartner.hasWorkingAbility(:PLUS) ||
         attacker.pbPartner.hasWorkingAbility(:MINUS)
        anim=true
        if attacker.pbPartner.pbCanIncreaseStatStage?(PBStats::ATTACK,true)
          attacker.pbPartner.pbIncreaseStat(PBStats::ATTACK,1,true,anim)
          anim=false
        end
        if attacker.pbPartner.pbCanIncreaseStatStage?(PBStats::SPATK,true)
          attacker.pbPartner.pbIncreaseStat(PBStats::SPATK,1,true,anim)
        end
      end
    end
    return 0
  end
end
Speed Swap
Code:
################################################################################
# User and target swap their Speed stats
################################################################################
class PokeBattle_Move_1B7 < PokeBattle_Move
  def pbEffect(attacker,opponent,hitnum=0,alltargets=nil,showanimation=true)
    pbShowAnimation(@id,attacker,opponent,hitnum,alltargets,showanimation)
    attacker.speed,opponent.speed=opponent.speed,attacker.speed
    @battle.pbDisplay(_INTL("{1} switched their Speed stats!",attacker.pbThis))
    return 0
  end
end
Shore Up
Code:
################################################################################
# Heals user by 1/2 of its max HP.
# In a sandstorm, heals user by 3/4 of its max HP.
################################################################################
class PokeBattle_Move_1A3 < PokeBattle_Move
  def pbEffect(attacker,opponent,hitnum=0,alltargets=nil,showanimation=true)
    if attacker.effects[PBEffects::HealBlock]>0
      @battle.pbDisplay(_INTL("{1} can't use {2} because of Heal Block!",attacker.pbThis,name))
      return -1
    end
    if attacker.hp==attacker.totalhp
      @battle.pbDisplay(_INTL("{1}'s HP is full!",attacker.pbThis))
      return -1
    end
    pbShowAnimation(@id,attacker,nil,hitnum,alltargets,showanimation)
    inc=0.5
    inc=0.75 if @battle.pbWeather==PBWeather::SANDSTORM
    attacker.pbRecoverHP(((attacker.totalhp+1)*inc).floor,true)
    @battle.pbDisplay(_INTL("{1}'s HP was restored.",attacker.pbThis))
    return 0
  end
end
Spotlight
Code:
################################################################################
# This round, target becomes the target of attacks that have single targets.
################################################################################
class PokeBattle_Move_1A6 < PokeBattle_Move
  def pbEffect(attacker,opponent,hitnum=0,alltargets=nil,showanimation=true)
    if [email protected]
      @battle.pbDisplay(_INTL("But it failed!"))
      return -1
    end
    pbShowAnimation(@id,attacker,nil,hitnum,alltargets,showanimation)
    opponent.effects[PBEffects::FollowMe]=true
    if !opponent.pbPartner.isFainted?
      opponent.pbPartner.effects[PBEffects::FollowMe]=false
    end
    @battle.pbDisplay(_INTL("{1} shone a spotlight on {2}!",attacker.pbThis,opponent.pbThis))
    return 0
  end
end
Revelation Dance
Code:
################################################################################
# Move type changes based on user's primary type
################################################################################
class PokeBattle_Move_192 < PokeBattle_Move
  def pbType(type,attacker,opponent)
    return attacker.type1
  end
end
(originally had this one coded a lot more complicated, where it checks to be sure the attacker is Oricorio, then goes by the form's primary type. Turns out it goes by primary type regardless of species.)

Instruct
Code:
################################################################################
# Instructs the target to use the move it last used again.
################################################################################
class PokeBattle_Move_194 < PokeBattle_Move
  def pbEffect(attacker,opponent,hitnum=0,alltargets=nil,showanimation=true)
    if opponent.lastMoveUsed<=0 ||
       (PBMoveData.new(opponent.lastMoveUsed).flags&0x10)==0 # flag e: Copyable by Mirror Move
      @battle.pbDisplay(_INTL("The instruction failed!"))
      return -1
    end
    opponent.pbUseMoveSimple(opponent.lastMoveUsed,-1,opponent.index)
    return 0
  end
end
Brilliant work, Rot8er_ConeX! Thanks a lot for all those moves! However, I did notice you hasn't posted "Core Enforcer", and since you said you'd have trouble with it, I wonder if you made it or not. Anyway, after that tip you gave me (I had completely forgotten about "Gastro Acid") I just combined Payback + Gastro Acid and it seems to be working perfectly. I'm sure you've already done it by now, but just in case, that's my suggestion.
Reply With Quote
  #23    
Old November 29th, 2016 (11:53 AM).
Rot8er_ConeX's Avatar
Rot8er_ConeX Rot8er_ConeX is offline
 
Join Date: May 2015
Location: The Dissa Region
Gender: Male
Posts: 765
Quote:
Originally Posted by PIMOC View Post
Brilliant work, Rot8er_ConeX! Thanks a lot for all those moves! However, I did notice you hasn't posted "Core Enforcer", and since you said you'd have trouble with it, I wonder if you made it or not. Anyway, after that tip you gave me (I had completely forgotten about "Gastro Acid") I just combined Payback + Gastro Acid and it seems to be working perfectly. I'm sure you've already done it by now, but just in case, that's my suggestion.
Thanks for the tip. Because of that, I created this:

Code:
################################################################################
# If the target has already moved this round, suppresses target's ability
################################################################################
class PokeBattle_Move_1B8 < PokeBattle_Move
  def pbAdditionalEffect(attacker,opponent)
    if opponent.hasMovedThisRound? && opponent.lastMoveUsed<=0
      if isConst?(opponent.ability,PBAbilities,:MULTITYPE) ||
         isConst?(opponent.ability,PBAbilities,:RKSSYSTEM) ||
         isConst?(opponent.ability,PBAbilities,:STANCECHANGE) ||
         isConst?(opponent.ability,PBAbilities,:DELTASTREAM) ||
         isConst?(opponent.ability,PBAbilities,:PRIMORDIALSEA) ||
         isConst?(opponent.ability,PBAbilities,:DESOLATELAND)
        return false
      end
      opponent.effects[PBEffects::GastroAcid]=true
      opponent.effects[PBEffects::Truant]=false
      @battle.pbDisplay(_INTL("{1}'s ability was suppressed!",opponent.pbThis)) 
      if opponent.effects[PBEffects::Illusion]!=nil #ILLUSION
        # Animation should go here
        # Break the illusion
        opponent.effects[PBEffects::Illusion]=nil
        @battle.pbDisplayEffect(opponent)
        @battle.scene.pbChangePokemon(opponent,opponent.pokemon)
        if EFFECTMESSAGES
          @battle.pbDisplay(_INTL("{1}'s {2} wore off!",opponent.pbThis,
              PBAbilities.getName(opponent.ability)))
        else
          @battle.pbDisplay(_INTL("{1}'s {2} was broken!",opponent.pbThis,
              PBAbilities.getName(opponent.ability)))
        end
      end #ILLUSION
      return true
    end
  end
end
__________________
Features of Pokemon Entropy

The black circular "doodles" in the lower right corner of my avatar are actually my username written in Gallifreyan. Yes I'm a Whovian.
Reply With Quote
  #24    
Old November 29th, 2016 (5:56 PM). Edited November 29th, 2016 by Rot8er_ConeX.
Rot8er_ConeX's Avatar
Rot8er_ConeX Rot8er_ConeX is offline
 
Join Date: May 2015
Location: The Dissa Region
Gender: Male
Posts: 765
Toxic Thread
Code:
################################################################################
# Poisons the target
# Decreases the target's Speed by 1 stage.
################################################################################
class PokeBattle_Move_1B9 < PokeBattle_Move
  def pbEffect(attacker,opponent,hitnum=0,alltargets=nil,showanimation=true)
    return -1 if !opponent.pbCanReduceStatStage?(PBStats::SPEED,true,false,attacker) && !opponent.pbCanPoison(false,@id,attacker)
    pbShowAnimation(@id,attacker,opponent,hitnum,alltargets,showanimation)
    opponent.pbReduceStat(PBStats::SPEED,1,true,true,false,attacker) if opponent.pbCanReduceStatStage?(PBStats::SPEED,true,false,attacker)
    if opponent.pbCanPoison(false,@id,attacker)
      opponent.pbPoison(attacker)
      @battle.pbDisplay(_INTL("{1} is poisoned!",opponent.pbThis))
    end
    return 0
  end
end
Burnup
Code:
################################################################################
# After attacking, the user removes this move's type from their own typing
# This move cannot be used for a Pokemon for which the move isn't STAB
################################################################################
class PokeBattle_Move_1B9 < PokeBattle_Move
  def pbEffect(attacker,opponent,hitnum=0,alltargets=nil,showanimation=true)
    [email protected]
    return -1 if !attacker.pbHasType?(type)
    ret=super(attacker,opponent,hitnum,alltargets,showanimation)
    if attacker.effects[PBEffects::Type3]==type
      attacker.effects[PBEffects::Type3]=-1
    end
    if attacker.type1==type && attacker.type2==type
      attacker.type1=getConst(PBTypes,:QMARKS)
      attacker.type2=getConst(PBTypes,:QMARKS)
    elsif attacker.type1==type  
      attacker.type1=attacker.type2
    elsif attacker.type2==type
      attacker.type2=attacker.type1
    end
  end
end
(Note that I coded it in such a way that the Fire type is never mentioned. People can use this code to make Burn-Out-type moves with other types.)
__________________
Features of Pokemon Entropy

The black circular "doodles" in the lower right corner of my avatar are actually my username written in Gallifreyan. Yes I'm a Whovian.
Reply With Quote
  #25    
Old November 30th, 2016 (7:05 AM).
PIMOC PIMOC is offline
 
Join Date: Jul 2016
Gender: Male
Posts: 15
Quote:
Originally Posted by Rot8er_ConeX View Post
Toxic Thread
Code:
################################################################################
# Poisons the target
# Decreases the target's Speed by 1 stage.
################################################################################
class PokeBattle_Move_1B9 < PokeBattle_Move
  def pbEffect(attacker,opponent,hitnum=0,alltargets=nil,showanimation=true)
    return -1 if !opponent.pbCanReduceStatStage?(PBStats::SPEED,true,false,attacker) && !opponent.pbCanPoison(false,@id,attacker)
    pbShowAnimation(@id,attacker,opponent,hitnum,alltargets,showanimation)
    opponent.pbReduceStat(PBStats::SPEED,1,true,true,false,attacker) if opponent.pbCanReduceStatStage?(PBStats::SPEED,true,false,attacker)
    if opponent.pbCanPoison(false,@id,attacker)
      opponent.pbPoison(attacker)
      @battle.pbDisplay(_INTL("{1} is poisoned!",opponent.pbThis))
    end
    return 0
  end
end
Burnup
Code:
################################################################################
# After attacking, the user removes this move's type from their own typing
# This move cannot be used for a Pokemon for which the move isn't STAB
################################################################################
class PokeBattle_Move_1B9 < PokeBattle_Move
  def pbEffect(attacker,opponent,hitnum=0,alltargets=nil,showanimation=true)
    [email protected]
    return -1 if !attacker.pbHasType?(type)
    ret=super(attacker,opponent,hitnum,alltargets,showanimation)
    if attacker.effects[PBEffects::Type3]==type
      attacker.effects[PBEffects::Type3]=-1
    end
    if attacker.type1==type && attacker.type2==type
      attacker.type1=getConst(PBTypes,:QMARKS)
      attacker.type2=getConst(PBTypes,:QMARKS)
    elsif attacker.type1==type  
      attacker.type1=attacker.type2
    elsif attacker.type2==type
      attacker.type2=attacker.type1
    end
  end
end
(Note that I coded it in such a way that the Fire type is never mentioned. People can use this code to make Burn-Out-type moves with other types.)
When I made burn up (using soak as a base), it seems to work perfectly for arcanine and typhlosion. However, for moltres, there is a problemas. Judging by the description of the move on serebii.net, it was supposed to remove only the fire type, which means moltres would become pure flying. But using my code it becomes "qmark" just like arcanine and typhlosion. Does your code solves that problem? Thanks for your hardwork.
Reply With Quote
Reply
Quick Reply

Sponsored Links
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 1:33 PM.