View Single Post
  #11    
Old September 5th, 2012, 02:36 AM
Black Temple Gaurdian
Unhatched Egg
 
Join Date: May 2010
So this is one of my earlier moves that will probably make a lot of people cringe. Problem is, when used ingame, it doesn't appear to raise stats. It's supposed to raise all stats then have to recharge.
Code:
class PokeBattle_Move_141 < PokeBattle_Move
  def pbEffect(attacker,opponent)
    ret=super(attacker,opponent)
    if opponent.damagestate.calcdamage>0
      attacker.effects[PBEffects::HyperBeam]=2
      attacker.currentMove=@id
    end
    return ret
    if !attacker.pbTooHigh?(PBStats::ATTACK)
      attacker.stages[PBStats::ATTACK]+=1
      @battle.pbCommonAnimation("StatUp",attacker,nil) if !haveanim; haveanim=true
      @battle.pbDisplay(_INTL("{1}'s Attack rose!",attacker.pbThis))
    end
    if !attacker.pbTooHigh?(PBStats::DEFENSE)
      attacker.stages[PBStats::DEFENSE]+=1
      @battle.pbCommonAnimation("StatUp",attacker,nil) if !haveanim; haveanim=true
      @battle.pbDisplay(_INTL("{1}'s Defense rose!",attacker.pbThis))
    end
    if !attacker.pbTooHigh?(PBStats::SPEED)
      attacker.stages[PBStats::SPEED]+=1
      @battle.pbCommonAnimation("StatUp",attacker,nil) if !haveanim; haveanim=true
      @battle.pbDisplay(_INTL("{1}'s Speed rose!",attacker.pbThis))
    end
    if !attacker.pbTooHigh?(PBStats::SPATK)
      attacker.stages[PBStats::SPATK]+=1
      @battle.pbCommonAnimation("StatUp",attacker,nil) if !haveanim; haveanim=true
      @battle.pbDisplay(_INTL("{1}'s Special Attack rose!",attacker.pbThis))
    end
    if !attacker.pbTooHigh?(PBStats::SPDEF)
      attacker.stages[PBStats::SPDEF]+=1
      @battle.pbCommonAnimation("StatUp",attacker,nil) if !haveanim; haveanim=true
      @battle.pbDisplay(_INTL("{1}'s Special Defense rose!",attacker.pbThis))
    end
    if !attacker.pbTooHigh?(PBStats::ACCURACY)
      attacker.stages[PBStats::ACCURACY]+=1
      @battle.pbCommonAnimation("StatUp",attacker,nil) if !haveanim; haveanim=true
      @battle.pbDisplay(_INTL("{1}'s Accuracy rose!",attacker.pbThis))
    end
    if !attacker.pbTooHigh?(PBStats::EVASION)
      attacker.stages[PBStats::EVASION]+=1
      @battle.pbCommonAnimation("StatUp",attacker,nil) if !haveanim; haveanim=true
      @battle.pbDisplay(_INTL("{1}'s Evasion rose!",attacker.pbThis))
    end
    return true
  end
end
EDIT: Grr, this one won't work either. It's *supposed* to inflict a random status ailment.
Code:
class PokeBattle_Move_148 < PokeBattle_Move
  def pbAdditionalEffect(attacker,opponent)
    rnd=@battle.pbRandom(10)
    case rnd
      when 0
        return false if !opponent.pbCanBurn?(true)
        opponent.pbBurn(attacker)
        @battle.pbDisplay(_INTL("{1} was burned!",opponent.pbThis))
      when 1
        return false if !opponent.pbCanFreeze?(true)
        opponent.pbFreeze
        @battle.pbDisplay(_INTL("{1} was frozen solid!",opponent.pbThis))
      when 2
        return false if !opponent.pbCanParalyze?(true)
        opponent.pbParalyze(attacker)
        @battle.pbDisplay(_INTL("{1} is paralyzed!  It may be unable to move!",opponent.pbThis))
      when 3
        return false if !opponent.pbCanPoison?(true)
        opponent.pbPoison(attacker)
        @battle.pb.Display(_INTL("{1} was poisoned!",opponent.pbThis))
      when 4
        return false if !opponent.pbCanSleep?(true)
        opponent.pbSleep
        @battle.pbDisplay(_INTL("{1} went to sleep!",opponent.pbThis))
      when 5
        return false if !opponent.pbCanBurn?(true)
        opponent.pbBurn(attacker)
        @battle.pbDisplay(_INTL("{1} was burned!",opponent.pbThis))
      when 6
        return false if !opponent.pbCanSleep?(true)
        opponent.pbSleep
        @battle.pbDisplay(_INTL("{1} went to sleep!",opponent.pbThis))
      when 7
        return false if !opponent.pbCanParalyze?(true)
        opponent.pbParalyze(attacker)
        @battle.pbDisplay(_INTL("{1} is paralyzed!  It may be unable to move!",opponent.pbThis))
      when 8
        return false if !opponent.pbCanPoison?(true)
        opponent.pbPoison(attacker)
        @battle.pb.Display(_INTL("{1} was poisoned!",opponent.pbThis))
      when 9
        return false if !opponent.pbCanSleep?(true)
        opponent.pbSleep
        @battle.pbDisplay(_INTL("{1} went to sleep!",opponent.pbThis))
    end
    return true
  end
end
__________________

Last edited by Black Temple Gaurdian; September 5th, 2012 at 03:02 AM.
Reply With Quote