- 67
- Posts
- 4
- Years
- He/Him
- Seen Nov 16, 2023
how would I recreate this in v18
################################################################################
# Increases the user and its partner's Speed by 1 stage. (Turbo Boost)
# If user is flying boost speed by 2 stages
################################################################################
class PokeBattle_Move_200 < PokeBattle_Move
def pbEffect(attacker,opponent,hitnum=0,alltargets=nil,showanimation=true)
return super(attacker,opponent,hitnum,alltargets,showanimation) if pbIsDamaging?
return -1 if !attacker.pbCanIncreaseStatStage?(PBStats::SPEED,attacker,true,self) &&
!attacker.pbPartner.pbCanIncreaseStatStage?(PBStats::SPEED,attacker,true,self)
pbShowAnimation(@id,attacker,opponent,hitnum,alltargets,showanimation)
increment=1
if attacker.pbHasType?(:FLYING) ||
attacker.pbPartner.pbHasType?(:FLYING)
attacker.pbIncreaseStat(PBStats::SPEED,2,attacker,false,self)
attacker.pbPartner.pbIncreaseStat(PBStats::SPEED,2,attacker,false,self)
elsif !attacker.pbHasType?(:FLYING) ||
!attacker.pbPartner.pbHasType?(:FLYING)
attacker.pbIncreaseStat(PBStats::SPEED,1,attacker,false,self)
attacker.pbPartner.pbIncreaseStat(PBStats::SPEED,1,attacker,false,self)
return 0
end
end
def pbAdditionalEffect(attacker,opponent)
if attacker.pbHasType?(:FLYING) ||
attacker.pbPartner.pbHasType?(:FLYING)
next if attacker.pbCanIncreaseStatStage?(PBStats::SPEED,attacker,false,self)
attacker.pbIncreaseStat(PBStats::SPEED,2,attacker,false,self)
elsif !attacker.pbHasType?(:FLYING) ||
!attacker.pbPartner.pbHasType?(:FLYING)
next if attacker.pbCanIncreaseStatStage?(PBStats::SPEED,attacker,false,self)
attacker.pbIncreaseStat(PBStats::SPEED,1,attacker,false,self)
end
if attacker.pbHasType?(:FLYING) ||
attacker.pbPartner.pbHasType?(:FLYING)
next if attacker.pbPartner.pbCanIncreaseStatStage?(PBStats::SPEED,attacker,false,self)
attacker.pbIncreaseStat(PBStats::SPEED,2,attacker,false,self)
elsif !attacker.pbHasType?(:FLYING) ||
!attacker.pbPartner.pbHasType?(:FLYING)
!attacker.pbPartner.pbCanIncreaseStatStage?(PBStats::SPEED,attacker,false,self)
attacker.pbIncreaseStat(PBStats::SPEED,1,attacker,false,self)
end
end
end
################################################################################
# Increases the user and its partner's Speed by 1 stage. (Turbo Boost)
# If user is flying boost speed by 2 stages
################################################################################
class PokeBattle_Move_200 < PokeBattle_Move
def pbEffect(attacker,opponent,hitnum=0,alltargets=nil,showanimation=true)
return super(attacker,opponent,hitnum,alltargets,showanimation) if pbIsDamaging?
return -1 if !attacker.pbCanIncreaseStatStage?(PBStats::SPEED,attacker,true,self) &&
!attacker.pbPartner.pbCanIncreaseStatStage?(PBStats::SPEED,attacker,true,self)
pbShowAnimation(@id,attacker,opponent,hitnum,alltargets,showanimation)
increment=1
if attacker.pbHasType?(:FLYING) ||
attacker.pbPartner.pbHasType?(:FLYING)
attacker.pbIncreaseStat(PBStats::SPEED,2,attacker,false,self)
attacker.pbPartner.pbIncreaseStat(PBStats::SPEED,2,attacker,false,self)
elsif !attacker.pbHasType?(:FLYING) ||
!attacker.pbPartner.pbHasType?(:FLYING)
attacker.pbIncreaseStat(PBStats::SPEED,1,attacker,false,self)
attacker.pbPartner.pbIncreaseStat(PBStats::SPEED,1,attacker,false,self)
return 0
end
end
def pbAdditionalEffect(attacker,opponent)
if attacker.pbHasType?(:FLYING) ||
attacker.pbPartner.pbHasType?(:FLYING)
next if attacker.pbCanIncreaseStatStage?(PBStats::SPEED,attacker,false,self)
attacker.pbIncreaseStat(PBStats::SPEED,2,attacker,false,self)
elsif !attacker.pbHasType?(:FLYING) ||
!attacker.pbPartner.pbHasType?(:FLYING)
next if attacker.pbCanIncreaseStatStage?(PBStats::SPEED,attacker,false,self)
attacker.pbIncreaseStat(PBStats::SPEED,1,attacker,false,self)
end
if attacker.pbHasType?(:FLYING) ||
attacker.pbPartner.pbHasType?(:FLYING)
next if attacker.pbPartner.pbCanIncreaseStatStage?(PBStats::SPEED,attacker,false,self)
attacker.pbIncreaseStat(PBStats::SPEED,2,attacker,false,self)
elsif !attacker.pbHasType?(:FLYING) ||
!attacker.pbPartner.pbHasType?(:FLYING)
!attacker.pbPartner.pbCanIncreaseStatStage?(PBStats::SPEED,attacker,false,self)
attacker.pbIncreaseStat(PBStats::SPEED,1,attacker,false,self)
end
end
end