Advertiser Content

Scripting Question Stomping Tantrum

Started by DonutDoctor10 6 Days Ago 2:28 PM
  • 296 views
  • 2 replies

WolfPP

Discord: Wolf#1235

Male
Brazil
Online now
Posted 10 Hours Ago
787 posts
1.1 Years
I use this and works fine to me '-'

Here what I putted:
Add inside 'PBEffects', paste under Yawn (112 is my last number):
Spoiler:

    LastMoveFailed     = 112
Then, 'PokeBattle_Battler' script, add under Yawn:
    @effects[PBEffects::WeightChange]     = 0
    @effects[PBEffects::Yawn]             = 0
    @effects[PBEffects::LastMoveFailed]   = false
Now, 'def pbProcessMoveAgainstTarget(thismove,user,target,numhits,turneffects,nocheck=false,alltargets=nil,showanimation=true)' add inside here:
        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::Stockpile]=0 if thismove.function==0x113 # Spit Up
        user.effects[PBEffects::LastMoveFailed]=true
        return
      end
      # Add to counters for moves which increase them when used in succession
And under Illusion code, replace for (pay attention about the line):
      # Illusion
      if target.effects[PBEffects::Illusion] && target.hasWorkingAbility(:ILLUSION) && damage>0 && 
      !target.damagestate.substitute
        PBDebug.log("[Ability triggered] #{target.pbThis}'s Illusion ended")    
        target.effects[PBEffects::Illusion]=nil; @battle.scene.pbChangePokemon(target,target.pokemon)
        @battle.pbDisplayEffect(target) if !$NoDisplayEffect
        if EFFECTMESSAGES
          @battle.pbDisplay(_INTL("{1}'s {2} wore off!",target.pbThis,PBAbilities.getName(target.ability)))
        else
          @battle.pbDisplay(_INTL("{1}'s {2} was broken!",target.pbThis,PBAbilities.getName(target.ability)))
        end
       PBDebug.log("[#{target.pbThis}'s Illusion was broken by #{user.pbThis(true)}]")    
      end
      user.pbFaint if user.fainted? # no return
      #return if numhits>1 && target.damagestate.calcdamage<=0
      if numhits>1 && target.damagestate.calcdamage<=0
        user.effects[PBEffects::LastMoveFailed]=true
        return
      end
      @battle.pbJudgeCheckpoint(user,thismove)
      # Additional effect
Same here:
    # Destiny Bond
    if !user.fainted? && target.fainted?
      if destinybond && target.pbIsOpposing?(user.index)
        PBDebug.log("[Lingering effect triggered] #{target.pbThis}'s Destiny Bond")
        @battle.pbDisplay(_INTL("{1} took its attacker down with it!",target.pbThis))
        user.pbReduceHP(user.hp)
        user.pbFaint # no return
        @battle.pbJudgeCheckpoint(user)
      end
    end
    pbEffectsAfterHit(user,target,thismove,turneffects)
    # Berry check
    for j in 0...4
      @battle.battlers[j].pbBerryCureCheck
    end
    target.pbUpdateTargetedMove(thismove,user)
    user.effects[PBEffects::LastMoveFailed]=false
  end
Finally, in PokeBattle_MoveEffect script, paste (change 162 for what you want, here and inside move.txt. They need to be the same number):
################################################################################
#Stomping Tantrum
################################################################################
class PokeBattle_Move_162 < PokeBattle_Move
  def pbBaseDamage(basedmg,attacker,opponent)
    return basedmg*2 if attacker.effects[PBEffects::LastMoveFailed]
    return basedmg
  end
end

Cya!
Advertiser Content