- 74
- Posts
- 5
- Years
- Seen yesterday
Can you post Schooling please?
Yawn = 108
BattleBond = 109
def pbResetFormAfterBattle
if !@effects[PBEffects::Transform]
if isConst?(self.species,PBSpecies,:GRENINJA) && self.form!=0
@effects[PBEffects::BattleBond]=false if @battle.pbAllFainted?(@battle.pbOpposingParty(self.index))
self.form=0
end
end
pbUpdate(true)
end
# Trace
if self.hasWorkingAbility(:TRACE)
choices=[]
for i in 0...4
[email protected][i]
if pbIsOpposing?(i) && !foe.fainted?
abil=foe.ability
if abil>0 &&
!isConst?(abil,PBAbilities,:TRACE) &&
!isConst?(abil,PBAbilities,:MULTITYPE) &&
!isConst?(abil,PBAbilities,:ILLUSION) &&
!isConst?(abil,PBAbilities,:FLOWERGIFT) &&
!isConst?(abil,PBAbilities,:IMPOSTER) &&
!isConst?(abil,PBAbilities,:STANCECHANGE) &&
!isConst?(abil,PBAbilities,:BATTLEBOND)
choices.push(i)
end
end
end
if choices.length>0
choice=choices[@battle.pbRandom(choices.length)]
[email protected][choice].pbThis(true)
[email protected][choice].ability
@ability=battlerability
abilityname=PBAbilities.getName(battlerability)
@battle.pbDisplay(_INTL("{1} traced {2}'s {3}!",pbThis,battlername,abilityname))
PBDebug.log("[Ability triggered] #{pbThis}'s Trace turned into #{abilityname} from #{battlername}")
end
end
# Battle Bond
if isConst?(user.species,PBSpecies,:GRENINJA) && user.hasWorkingAbility(:BATTLEBOND) &&
!user.effects[PBEffects::BattleBond]
if target.fainted? && !user.fainted? && user.form!=1 && [email protected]?(@battle.pbParty(target.index))
user.effects[PBEffects::BattleBond]=true
@battle.pbDisplay(_INTL("{1} became fully charged due to its bond with its Trainer!",user.pbThis))
@battle.pbCommonAnimation("BattleBond",user,nil)
user.form=1
user.pbUpdate(true)
@battle.scene.pbChangePokemon(user,user.pokemon)
@battle.pbCommonAnimation("BattleBond2",user,nil)
@battle.pbDisplay(_INTL("{1} became Ash-Greninja!",user.pbThis))
PBDebug.log("[Form changed] #{user.pbThis} changed to form #{user.form}")
end
end
def pbChooseNonEggPokemon(variableNumber,nameVarNumber)
pbChoosePokemon(variableNumber,nameVarNumber,proc {|poke|
!poke.egg? && !(isConst?(poke.species,PBSpecies,:GRENINJA) &&
isConst?(poke.ability,PBAbilities,:BATTLEBOND))
})
end
@scene.pbEndBattle(@decision)
for i in @battlers
i.pbResetForm
i.pbResetFormAfterBattle
if i.hasWorkingAbility(:NATURALCURE)
i.status=0
end
end
for i in $Trainer.party
@peer.pbOnEndingBattle(self,i)
i.setItem(i.itemInitial)
i.itemInitial=i.itemRecycle=0
i.belch=false
XXX,WATERSHURIKEN,Water Shuriken,0C0,15,WATER,Special,100,20,0,00,1,bef,"The user hits the target with throwing stars two to five times in a row. This move always goes first."
################################################################################
# Hits 2-5 times.
################################################################################
class PokeBattle_Move_0C0 < PokeBattle_Move
def pbIsMultiHit
return true
end
def pbBaseDamage(basedmg,attacker,opponent)
basedmg=20 if isConst?(@id,PBMoves,:WATERSHURIKEN) &&
attacker.hasWorkingAbility(:BATTLEBOND) &&
isConst?(attacker.species,PBSpecies,:GRENINJA) &&
attacker.form==1
return basedmg
end
def pbNumHits(attacker)
hitchances=[2,2,3,3,4,5]
ret=hitchances[@battle.pbRandom(hitchances.length)]
ret=5 if attacker.hasWorkingAbility(:SKILLLINK)
ret=3 if isConst?(@id,PBMoves,:WATERSHURIKEN) &&
attacker.hasWorkingAbility(:BATTLEBOND) &&
isConst?(attacker.species,PBSpecies,:GRENINJA) &&
attacker.form==1
return ret
end
end
Are all the abilities actually done here yet?(All 42)?
May I ask for all 42 gen 7 abilities?
battle bond ability please! I need it for the story of my game
Yeah, probably you have to replace "damagemult" with "finaldamagemult". Meanwhile you repair that, these are the next abilities:
Queenly Majesty and Dazzling:
In PokeBattle_Battler, just under def pbSuccessCheck":
In PokeBattle_Move, under def isBombMove?, place this def:Spoiler:Code:def pbSuccessCheck(thismove,user,target,turneffects,accuracy=true) [COLOR="Red"] if (target.hasWorkingAbility(:DAZZLING) || target.hasWorkingAbility(:QUEENLYMAJESTY)) && thismove.priority>0 && !thismove.doesIgnoreDazzling? && !user.hasMoldBreaker thismove.pp -=1 PBDebug.log("#{target.pbThis}'s #{PBAbilities.getName(target)} prevented #{user.pbThis}'s priority move") @battle.pbDisplay(_INTL("{1} cannot use {2} due to {3}!", user.pbThis, PBMoves.getName(thismove), PBAbilities.getName(target.ability))) return false end[/COLOR] if user.effects[PBEffects::TwoTurnAttack]>0 return true end
Spoiler:Code:def doesIgnoreDazzling? return isConst?(@id,PBMoves,:ELECTRICTERRAIN) || isConst?(@id,PBMoves,:FAIRYLOCK) || isConst?(@id,PBMoves,:GRASSYTERRAIN) || isConst?(@id,PBMoves,:GRAVITY) || isConst?(@id,PBMoves,:HAIL) || isConst?(@id,PBMoves,:HAZE) || isConst?(@id,PBMoves,:IONDELUGE) || isConst?(@id,PBMoves,:MAGICROOM) || isConst?(@id,PBMoves,:MISTYTERRAIN) || isConst?(@id,PBMoves,:MUDSPORT) || isConst?(@id,PBMoves,:PSYCHICTERRAIN) || isConst?(@id,PBMoves,:RAINDANCE) || isConst?(@id,PBMoves,:SANDSTORM) || isConst?(@id,PBMoves,:SUNNYDAY) || isConst?(@id,PBMoves,:TRICKROOM) || isConst?(@id,PBMoves,:WATERSPORT) || isConst?(@id,PBMoves,:WONDERROOM) || isConst?(@id,PBMoves,:SPIKES) || isConst?(@id,PBMoves,:STEALTHROCK) || isConst?(@id,PBMoves,:STICKYWEB) || isConst?(@id,PBMoves,:TOXICSPIKES) end
Done.
def pbSuccessCheck(thismove,user,target,turneffects,accuracy=true)
[COLOR="Red"] if (target.hasWorkingAbility(:DAZZLING) ||
target.hasWorkingAbility(:QUEENLYMAJESTY)) && thismove.priority>0 &&
!thismove.doesIgnoreDazzling? && !user.hasMoldBreaker
thismove.pp -=1
PBDebug.log("#{target.pbThis}'s #{PBAbilities.getName(target)} prevented #{user.pbThis}'s priority move")
@battle.pbDisplay(_INTL("{1} cannot use {2} due to {3}!",
user.pbThis,
PBMoves.getName(thismove),
PBAbilities.getName(target.ability)))
return false
end[/COLOR]
if user.effects[PBEffects::TwoTurnAttack]>0
return true
end
# TODO: "Before Protect" applies to Counter/Mirror Coat
if thismove.function==0xDE && # Dream Eater
target.status!=PBStatuses::SLEEP && (!target.hasWorkingAbility(:COMATOSE) || !isConst?(target.species,PBSpecies,:KOMALA))
@battle.pbDisplay(_INTL("{1} wasn't affected!",target.pbThis))
PBDebug.log("[Move failed] #{user.pbThis}'s Dream Eater's target isn't asleep")
return false
end
if thismove.function==0x113 && user.effects[PBEffects::Stockpile]==0 # Spit Up
@battle.pbDisplay(_INTL("But it failed to spit up a thing!"))
PBDebug.log("[Move failed] #{user.pbThis}'s Spit Up did nothing as Stockpile's count is 0")
return false
end
if target.effects[PBEffects::Protect] && thismove.canProtectAgainst? &&
!target.effects[PBEffects::ProtectNegation]
@battle.pbDisplay(_INTL("{1} protected itself!",target.pbThis))
@battle.successStates[user.index].protected=true
PBDebug.log("[Move failed] #{target.pbThis}'s Protect stopped the attack")
return false
end
p=thismove.priority
if USENEWBATTLEMECHANICS
[COLOR="Red"]if p>0 && thismove.target!=PBTargets::AllOpposing && thismove.target!=PBTargets::BothSides
for i in 0...4; [email protected][i]
if @battle.field.effects[PBEffects::PsychicTerrain]>0 && !user.isAirborne?
PBDebug.log("Psychic Terrain prevented #{user.pbThis}'s priority move")
@battle.pbDisplay(_INTL("The psychic terrain prevented the use of priority moves!"))
return false
elsif !user.hasMoldBreaker && pbIsOpposing?(i) && (battler.hasWorkingAbility(:QUEENLYMAJESTY) ||
battler.hasWorkingAbility(:DAZZLING))
@battle.pbDisplay(_INTL("{1} cannot use {2}!",user.pbThis,PBMoves.getName(thismove)))
return false[/COLOR]
end
end
What you mean, we are not hackers.binary hacking
Hi! I am stuck with binary hacking and was wondering is there a way to implement slush rush, and also wondering what software are you guys using to edit the abilities?
PS: is there a way to add terrains you know?
Slush Rush:
Spoiler:In PokeBattle_Battler, in def pbSpeed:
Spoiler:Code:case @battle.pbWeather when PBWeather::RAINDANCE, PBWeather::HEAVYRAIN speedmult=speedmult*2 if self.hasWorkingAbility(:SWIFTSWIM) when PBWeather::SUNNYDAY, PBWeather::HARSHSUN speedmult=speedmult*2 if self.hasWorkingAbility(:CHLOROPHYLL) when PBWeather::SANDSTORM speedmult=speedmult*2 if self.hasWorkingAbility(:SANDRUSH) [COLOR="Red"]when PBWeather::HAIL speedmult=speedmult*2 if self.hasWorkingAbility(:SLUSHRUSH)[/COLOR] end
Ah, I saw now what those items are. Probably tomorrow, you'll have all these abilities.
Edit: so here you have them. Rather than figure out what are my additions, I'll put all that is related to terrains (excepting Z-Moves). So, add only what you don't have from this enormous resource.
All Surges plus seeds, extender, moves and more:
In PBEffects, make sure you have all four effects for the respective terrains:
Also, in PokeBattle_ActiveSideField:Spoiler:Code:############################################################################ # These effects apply to the battle (i.e. both sides) [COLOR="Red"]ElectricTerrain = 0[/COLOR] FairyLock = 1 FusionBolt = 2 FusionFlare = 3 [COLOR="red"]GrassyTerrain = 4[/COLOR] Gravity = 5 IonDeluge = 6 MagicRoom = 7 [COLOR="red"]MistyTerrain = 8[/COLOR] MudSportField = 9 TrickRoom = 10 WaterSportField = 11 WonderRoom = 12 [COLOR="red"] PsychicTerrain = 13[/COLOR]
In PokeBattle_Battler:Spoiler:Code:class PokeBattle_ActiveField attr_accessor :effects def initialize @effects = [] [COLOR="red"]@effects[PBEffects::ElectricTerrain] = 0[/COLOR] @effects[PBEffects::FairyLock] = 0 @effects[PBEffects::FusionBolt] = false @effects[PBEffects::FusionFlare] = false [COLOR="red"]@effects[PBEffects::GrassyTerrain] = 0[/COLOR] @effects[PBEffects::Gravity] = 0 @effects[PBEffects::IonDeluge] = false @effects[PBEffects::MagicRoom] = 0 [COLOR="red"] @effects[PBEffects::MistyTerrain] = 0[/COLOR] @effects[PBEffects::MudSportField] = 0 @effects[PBEffects::TrickRoom] = 0 @effects[PBEffects::WaterSportField] = 0 @effects[PBEffects::WonderRoom] = 0 [COLOR="red"]@effects[PBEffects::PsychicTerrain] = 0[/COLOR] end end
Spoiler:in def pbspeed
above # Pressure message:Spoiler:Code:def pbSpeed stagemul=[10,10,10,10,10,10,10,15,20,25,30,35,40] stagediv=[40,35,30,25,20,15,10,10,10,10,10,10,10] speed=@speed stage=@stages[PBStats::SPEED]+6 speed=(speed*stagemul[stage]/stagediv[stage]).floor speedmult=0x1000 [COLOR="red"] if @battle.field.effects[PBEffects::ElectricTerrain]>0 speedmult=speedmult*2 if self.hasWorkingAbility(:SURGESURFER) end[/COLOR]
in pbSuccessCheck (refer to my previous posts in this thread for the definition of doesIgnoreDazzling?)Spoiler:Code:# Electric Surge if self.hasWorkingAbility(:ELECTRICSURGE) && @battle.field.effects[PBEffects::ElectricTerrain]<=0 && onactive @battle.field.effects[PBEffects::PsychicTerrain]=0 @battle.field.effects[PBEffects::GrassyTerrain]=0 @battle.field.effects[PBEffects::MistyTerrain]=0 if self.hasWorkingItem(:TERRAINEXTENDER) @battle.field.effects[PBEffects::ElectricTerrain]=8 else @battle.field.effects[PBEffects::ElectricTerrain]=5 end # @battle.pbDisplayEffect(self,false) # @battle.pbHideEffect(self) @battle.pbDisplay(_INTL("An electric current runs across the battlefield!")) PBDebug.log("[#{pbThis} summoned Electric Terrain]") end # Psychic Surge if self.hasWorkingAbility(:PSYCHICSURGE) && @battle.field.effects[PBEffects::PsychicTerrain]<=0 && onactive @battle.field.effects[PBEffects::ElectricTerrain]=0 @battle.field.effects[PBEffects::GrassyTerrain]=0 @battle.field.effects[PBEffects::MistyTerrain]=0 if self.hasWorkingItem(:TERRAINEXTENDER) @battle.field.effects[PBEffects::PsychicTerrain]=8 else @battle.field.effects[PBEffects::PsychicTerrain]=5 end # @battle.pbDisplayEffect(self,false) # @battle.pbHideEffect(self) @battle.pbDisplay(_INTL("A psychic terrain was summoned!")) PBDebug.log("[#{pbThis} summoned Psychic Terrain]") end # Grassy Surge if self.hasWorkingAbility(:GRASSYSURGE) && @battle.field.effects[PBEffects::GrassyTerrain]<=0 && onactive @battle.field.effects[PBEffects::ElectricTerrain]=0 @battle.field.effects[PBEffects::PsychicTerrain]=0 @battle.field.effects[PBEffects::MistyTerrain]=0 if self.hasWorkingItem(:TERRAINEXTENDER) @battle.field.effects[PBEffects::GrassyTerrain]=8 else @battle.field.effects[PBEffects::GrassyTerrain]=5 end # @battle.pbDisplayEffect(self,false) # @battle.pbHideEffect(self) @battle.pbDisplay(_INTL("Grass grew to cover the battlefield!")) PBDebug.log("[#{pbThis} summoned Grassy Terrain]") end # Misty Surge if self.hasWorkingAbility(:MISTYSURGE) && @battle.field.effects[PBEffects::MistyTerrain]<=0 && onactive @battle.field.effects[PBEffects::ElectricTerrain]=0 @battle.field.effects[PBEffects::GrassyTerrain]=0 @battle.field.effects[PBEffects::PsychicTerrain]=0 if self.hasWorkingItem(:TERRAINEXTENDER) @battle.field.effects[PBEffects::MistyTerrain]=8 else @battle.field.effects[PBEffects::MistyTerrain]=5 end # @battle.pbDisplayEffect(self,false) # @battle.pbHideEffect(self) @battle.pbDisplay(_INTL("Mist swirls around the battlefield!")) PBDebug.log("[#{pbThis}: Misty Surge made Misty Terrain]") end
a bit below that:Spoiler:Code:def pbSuccessCheck(thismove,user,target,turneffects,accuracy=true) [COLOR="red"]if @battle.field.effects[PBEffects::PsychicTerrain]>0 && thismove.priority>0 && !user.isAirborne?(false) && !thismove.doesIgnoreDazzling? PBDebug.log("Psychic Terrain prevented #{user.pbThis}'s priority move") @battle.pbDisplay(_INTL("The psychic terrain prevented the use of priority moves!")) return false end[/COLOR]
Spoiler:Code:if USENEWBATTLEMECHANICS p+=1 if user.hasWorkingAbility(:PRANKSTER) && thismove.pbIsStatus? p+=1 if user.hasWorkingAbility(:GALEWINGS) && isConst?(thismove.type,PBTypes,:FLYING) p+=3 if user.hasWorkingAbility(:TRIAGE) && thismove.isHealingMove? && !isConst?(thismove.id,PBMoves,:AQUARING) [COLOR="red"]&& !isConst?(thismove.id,PBMoves,:GRASSYTERRAIN)[/COLOR] && !isConst?(thismove.id,PBMoves,:INGRAIN) && !isConst?(thismove.id,PBMoves,:LEECHSEED) && !isConst?(thismove.id,PBMoves,:PAINSPLIT) && !isConst?(thismove.id,PBMoves,:PRESENT) && !isConst?(thismove.id,PBMoves,:POLLENPUFF) end
In PokeBattle_BattlerEffects:
Spoiler:in def pbsleep?
in pbCanSleepYawn?Spoiler:Code:if !selfsleep if self.status!=0 || (@effects[PBEffects::Substitute]>0 && (!move || !move.ignoresSubstitute?(attacker))) @battle.pbDisplay(_INTL("But it failed!")) if showMessages return false end end [COLOR="red"] if !self.isAirborne?(attacker && attacker.hasMoldBreaker) if @battle.field.effects[PBEffects::ElectricTerrain]>0 @battle.pbDisplay(_INTL("The Electric Terrain prevented {1} from falling asleep!",pbThis(true))) if showMessages return false elsif @battle.field.effects[PBEffects::MistyTerrain]>0 @battle.pbDisplay(_INTL("The Misty Terrain prevented {1} from falling asleep!",pbThis(true))) if showMessages return false end end[/COLOR]
in def pbCanPoison?Spoiler:Code:if !hasWorkingAbility(:SOUNDPROOF) for i in 0...4 return false if @battle.battlers[i].effects[PBEffects::Uproar]>0 end end [COLOR="red"]if !self.isAirborne? return false if @battle.field.effects[PBEffects::ElectricTerrain]>0 return false if @battle.field.effects[PBEffects::MistyTerrain]>0 end[/COLOR]
in def pbCanPoisonSynchronize?Spoiler:Code:if (pbHasType?(:POISON) || pbHasType?(:STEEL)) && !hasWorkingItem(:RINGTARGET) && !self.hasWorkingAbility(:CORROSION) @battle.pbDisplay(_INTL("It doesn't affect {1}...",pbThis(true))) if showMessages return false end [COLOR="red"]if @battle.field.effects[PBEffects::MistyTerrain]>0 && !self.isAirborne?(attacker && attacker.hasMoldBreaker) @battle.pbDisplay(_INTL("The Misty Terrain prevented {1} from being poisoned!",pbThis(true))) if showMessages return false end[/COLOR]
in def pbCanBurn?Spoiler:Code:[COLOR="red"]return false if @battle.field.effects[PBEffects::MistyTerrain]>0 && !self.isAirborne?[/COLOR] if (pbHasType?(:POISON) || pbHasType?(:STEEL)) && !hasWorkingItem(:RINGTARGET) @battle.pbDisplay(_INTL("{1}'s {2} had no effect on {3}!", opponent.pbThis,PBAbilities.getName(opponent.ability),pbThis(true))) return false end
in def pbCanBurnSynchronize?Spoiler:Code:if self.status!=0 || (@effects[PBEffects::Substitute]>0 && (!move || !move.ignoresSubstitute?(attacker))) @battle.pbDisplay(_INTL("But it failed!")) if showMessages return false end [COLOR="red"]if @battle.field.effects[PBEffects::MistyTerrain]>0 && !self.isAirborne?(attacker && attacker.hasMoldBreaker) @battle.pbDisplay(_INTL("The Misty Terrain prevented {1} from being burned!",pbThis(true))) if showMessages return false end[/COLOR]
in def pbCanParalyze?Spoiler:Code:[COLOR="red"]return false if @battle.field.effects[PBEffects::MistyTerrain]>0 && !self.isAirborne?[/COLOR] if pbHasType?(:FIRE) && !hasWorkingItem(:RINGTARGET) @battle.pbDisplay(_INTL("{1}'s {2} had no effect on {3}!", opponent.pbThis,PBAbilities.getName(opponent.ability),pbThis(true))) return false end
in pbCanParalyzeSynchronize?Spoiler:Code:if self.status!=0 || (@effects[PBEffects::Substitute]>0 && (!move || !move.ignoresSubstitute?(attacker))) @battle.pbDisplay(_INTL("But it failed!")) if showMessages return false end [COLOR="Red"]if @battle.field.effects[PBEffects::MistyTerrain]>0 && !self.isAirborne?(attacker && attacker.hasMoldBreaker) @battle.pbDisplay(_INTL("The Misty Terrain prevented {1} from being paralyzed!",pbThis(true))) if showMessages return false end[/COLOR]
in def pbCanFreeze?Spoiler:Code:[COLOR="red"]return false if @battle.field.effects[PBEffects::MistyTerrain]>0 && !self.isAirborne?[/COLOR] return false if pbHasType?(:ELECTRIC) && !hasWorkingItem(:RINGTARGET) && USENEWBATTLEMECHANICS
Spoiler:Code:if pbHasType?(:ICE) && !hasWorkingItem(:RINGTARGET) @battle.pbDisplay(_INTL("It doesn't affect {1}...",pbThis(true))) if showMessages return false end [COLOR="red"]if @battle.field.effects[PBEffects::MistyTerrain]>0 && !self.isAirborne?((attacker && attacker.hasMoldBreaker) || ( move && move.doesBypassIgnorableAbilities?)) @battle.pbDisplay(_INTL("The Misty Terrain prevented {1} from being frozen!",pbThis(true))) if showMessages return false end[/COLOR]
In PokeBattle_Move:
In PokeBattle_MoveEffects:Spoiler:in def pbCalcDamage
Spoiler:Code:[COLOR="red"]if @battle.field.effects[PBEffects::ElectricTerrain]>0 && !attacker.isAirborne?(attacker.hasMoldBreaker) && isConst?(type,PBTypes,:ELECTRIC) damagemult=(damagemult*1.5).round end if @battle.field.effects[PBEffects::GrassyTerrain]>0 && !attacker.isAirborne?(attacker.hasMoldBreaker) && isConst?(type,PBTypes,:GRASS) damagemult=(damagemult*1.5).round end if @battle.field.effects[PBEffects::MistyTerrain]>0 && !opponent.isAirborne?(attacker.hasMoldBreaker) && isConst?(type,PBTypes,:DRAGON) damagemult=(damagemult*0.5).round end if @battle.field.effects[PBEffects::PsychicTerrain]>0 && !attacker.isAirborne?(attacker.hasMoldBreaker) && isConst?(type,PBTypes,:PSYCHIC) damagemult=(damagemult*1.5).round end[/COLOR] if opponent.effects[PBEffects::Minimize] && tramplesMinimize?(2) damagemult=(damagemult*2.0).round end
Spoiler:at function 0x44
at function 0x60Spoiler:Code:def pbModifyDamage(damagemult,attacker,opponent) if isConst?(@id,PBMoves,:BULLDOZE) [COLOR="red"]&& @battle.field.effects[PBEffects::GrassyTerrain]>0[/COLOR] return (damagemult/2.0).round end return damagemult end
at function 0x76Spoiler:Code:[COLOR="red"]if @battle.field.effects[PBEffects::ElectricTerrain]>0 type=getConst(PBTypes,:ELECTRIC) if hasConst?(PBTypes,:ELECTRIC) elsif @battle.field.effects[PBEffects::GrassyTerrain]>0 type=getConst(PBTypes,:GRASS) if hasConst?(PBTypes,:GRASS) elsif @battle.field.effects[PBEffects::MistyTerrain]>0 type=getConst(PBTypes,:FAIRY) if hasConst?(PBTypes,:FAIRY) elsif @battle.field.effects[PBEffects::PsychicTerrain]>0 type=getConst(PBTypes,:PSYCHIC) if hasConst?(PBTypes,:PSYCHIC) end[/COLOR] if attacker.pbHasType?(type) @battle.pbDisplay(_INTL("But it failed!")) return -1 end
at function 0x95Spoiler:Code:class PokeBattle_Move_076 < PokeBattle_Move def pbModifyDamage(damagemult,attacker,opponent) ret=damagemult if PBMoveData.new(opponent.effects[PBEffects::TwoTurnAttack]).function==0xCA # Dig ret=(damagemult*2.0).round end [COLOR="red"]if @battle.field.effects[PBEffects::GrassyTerrain]>0 ret=(damagemult/0.5).round end[/COLOR] return ret end end
at functio 0xA4Spoiler:Code:def pbBaseDamage(basedmg,attacker,opponent) ret=@calcbasedmg if PBMoveData.new(opponent.effects[PBEffects::TwoTurnAttack]).function==0xCA # Dig ret*=2 end [COLOR="red"]if @battle.field.effects[PBEffects::GrassyTerrain]>0 ret=(ret/2.0).round end[/COLOR] return ret end
andSpoiler:Code:class PokeBattle_Move_0A4 < PokeBattle_Move def pbAdditionalEffect(attacker,opponent) return if opponent.damagestate.substitute [COLOR="red"]if @battle.field.effects[PBEffects::ElectricTerrain]>0 if opponent.pbCanParalyze?(attacker,false,self) opponent.pbParalyze(attacker) end return elsif @battle.field.effects[PBEffects::GrassyTerrain]>0 if opponent.pbCanSleep?(attacker,false,self) opponent.pbSleep end return elsif @battle.field.effects[PBEffects::MistyTerrain]>0 if opponent.pbCanReduceStatStage?(PBStats::SPATK,attacker,false,self) opponent.pbReduceStat(PBStats::SPATK,1,attacker,false,self) end return elsif @battle.field.effects[PBEffects::PsychicTerrain]>0 if opponent.pbCanReduceStatStage?(PBStats::SPEED,attacker,false,self) opponent.pbReduceStat(PBStats::SPEED,1,attacker,false,self) end return end[/COLOR]
at function 0xB3Spoiler:Code:def pbShowAnimation(id,attacker,opponent,hitnum=0,alltargets=nil,showanimation=true) id=getConst(PBMoves,:BODYSLAM) if @battle.field.effects[PBEffects::ElectricTerrain]>0 id=getConst(PBMoves,:THUNDERSHOCK) || id elsif @battle.field.effects[PBEffects::GrassyTerrain]>0 id=getConst(PBMoves,:VINEWHIP) || id elsif @battle.field.effects[PBEffects::MistyTerrain]>0 id=getConst(PBMoves,:FAIRYWIND) || id [COLOR="red"]elsif @battle.field.effects[PBEffects::PsychicTerrain]>0 id=getConst(PBMoves,:CONFUSION) || id[/COLOR] else case @battle.environment when PBEnvironment::Grass, PBEnvironment::TallGrass id=((USENEWBATTLEMECHANICS) ? getConst(PBMoves,:VINEWHIP) : getConst(PBMoves,:NEEDLEARM)) || id when PBEnvironment::MovingWater; id=getConst(PBMoves,:WATERPULSE) || id when PBEnvironment::StillWater; id=getConst(PBMoves,:MUDSHOT) || id when PBEnvironment::Underwater; id=getConst(PBMoves,:WATERPULSE) || id when PBEnvironment::Cave; id=getConst(PBMoves,:ROCKTHROW) || id when PBEnvironment::Rock; id=getConst(PBMoves,:MUDSLAP) || id when PBEnvironment::Sand; id=getConst(PBMoves,:MUDSLAP) || id when PBEnvironment::Forest; id=getConst(PBMoves,:RAZORLEAF) || id # Ice tiles in Gen 6 should be Ice Shard when PBEnvironment::Snow; id=getConst(PBMoves,:AVALANCHE) || id when PBEnvironment::Volcano; id=getConst(PBMoves,:INCINERATE) || id when PBEnvironment::Graveyard; id=getConst(PBMoves,:SHADOWSNEAK) || id when PBEnvironment::Sky; id=getConst(PBMoves,:GUST) || id when PBEnvironment::Space; id=getConst(PBMoves,:SWIFT) || id end end return super(id,attacker,opponent,hitnum,alltargets,showanimation) # Environment-specific anim end
at function 0xF7Spoiler:Code:if @battle.field.effects[PBEffects::ElectricTerrain]>0 move=getConst(PBMoves,:THUNDERBOLT) || move elsif @battle.field.effects[PBEffects::GrassyTerrain]>0 move=getConst(PBMoves,:ENERGYBALL) || move elsif @battle.field.effects[PBEffects::MistyTerrain]>0 move=getConst(PBMoves,:MOONBLAST) || move [COLOR="red"]elsif @battle.field.effects[PBEffects::PsychicTerrain]>0 move=getConst(PBMoves,:PSYCHIC) || move[/COLOR] end
the moves:Spoiler:Code:130 => [:IRONBALL], 100 => [:ARMORFOSSIL,:CLAWFOSSIL,:COVERFOSSIL,:DOMEFOSSIL,:HARDSTONE, :HELIXFOSSIL,:JAWFOSSIL,:OLDAMBER,:PLUMEFOSSIL,:RAREBONE, :ROOTFOSSIL,:SAILFOSSIL,:SKULLFOSSIL], 90 => [:DEEPSEATOOTH,:DRACOPLATE,:DREADPLATE,:EARTHPLATE,:FISTPLATE, :FLAMEPLATE,:GRIPCLAW,:ICICLEPLATE,:INSECTPLATE,:IRONPLATE, :MEADOWPLATE,:MINDPLATE,:PIXIEPLATE,:SKYPLATE,:SPLASHPLATE, :SPOOKYPLATE,:STONEPLATE,:THICKCLUB,:TOXICPLATE,:ZAPPLATE], 80 => [:ASSAULTVEST,:DAWNSTONE,:DUSKSTONE,:ELECTIRIZER,:MAGMARIZER, :ODDKEYSTONE,:OVALSTONE,:PROTECTOR,:QUICKCLAW,:RAZORCLAW, :SAFETYGOGGLES,:SHINYSTONE,:STICKYBARB,:WEAKNESSPOLICY,:SACHET, :WHIPPEDDREAM], 70 => [:BURNDRIVE,:CHILLDRIVE,:DOUSEDRIVE,:DRAGONFANG,:POISONBARB, :POWERANKLET,:POWERBAND,:POWERBELT,:POWERBRACER,:POWERLENS, :POWERWEIGHT,:SHOCKDRIVE], 60 => [:ADAMANTORB,:DAMPROCK,:GRISEOUSORB,:HEATROCK,:LUSTROUSORB, :MACHOBRACE,:ROCKYHELMET,:STICK,[COLOR="red"]:TERRAINEXTENDER[/COLOR]], 50 => [:DUBIOUSDISC,:SHARPBEAK,:BUGMEMORY,:DARKMEMORY,:DRAGONMEMORY, :ELECTRICMEMORY,:FAIRYMEMORY,:FIGHTING,:FIREMEMORY,:FLYINGMEMORY, :GHOSTMEMORY,:GRASSMEMORY,:GROUNDMEMORY,:ICEMEMORY,:PSYCHICMEMORY, :ROCKMEMORY,:STEELMEMORY,:WATERMEMORY,:POISONMEMORY], 40 => [:EVIOLITE,:ICYROCK,:LUCKYPUNCH], 30 => [:ABILITYURGE,:ABSORBBULB,:AMAZEMULCH,:AMULETCOIN, :ANTIDOTE,:AWAKENING,:BALMMUSHROOM,:BERRYJUICE,:BIGMUSHROOM, :BIGNUGGET,:BIGPEARL,:BINDINGBAND,:BLACKBELT,:BLACKFLUTE, :BLACKGLASSES,:BLACKSLUDGE,:BLUEFLUTE,:BLUESHARD,:BOOSTMULCH, :BURNHEAL,:CALCIUM,:CARBOS,:CASTELIACONE,:CELLBATTERY, :CHARCOAL,:CLEANSETAG,:COMETSHARD,:DAMPMULCH,:DEEPSEASCALE, :DIREHIT,:DIREHIT2,:DIREHIT3,:DRAGONSCALE,:EJECTBUTTON, :ELIXIR,:ENERGYPOWDER,:ENERGYROOT,:ESCAPEROPE,:ETHER, :EVERSTONE,:EXPSHARE,:FIRESTONE,:FLAMEORB,:FLOATSTONE, :FLUFFYTAIL,:FRESHWATER,:FULLHEAL,:FULLRESTORE,:GOOEYMULCH, :GREENSHARD,:GROWTHMULCH,:GUARDSPEC,:HEALPOWDER,:HEARTSCALE, :HONEY,:HPUP,:HYPERPOTION,:ICEHEAL,:IRON, :ITEMDROP,:ITEMURGE,:KINGSROCK,:LAVACOOKIE,:LEAFSTONE, :LEMONADE,:LIFEORB,:LIGHTBALL,:LIGHTCLAY,:LUCKYEGG, :LUMINOUSMOSS,:LUMIOSEGALETTE,:MAGNET,:MAXELIXIR,:MAXETHER, :MAXPOTION,:MAXREPEL,:MAXREVIVE,:METALCOAT,:METRONOME, :MIRACLESEED,:MOOMOOMILK,:MOONSTONE,:MYSTICWATER,:NEVERMELTICE, :NUGGET,:OLDGATEAU,:PARALYZEHEAL,:PARLYZHEAL,:PASSORB, :PEARL,:PEARLSTRING,:POKEDOLL,:POKETOY,:POTION, :PPMAX,:PPUP,:PRISMSCALE,:PROTEIN,:RAGECANDYBAR, :RARECANDY,:RAZORFANG,:REDFLUTE,:REDSHARD,:RELICBAND, :RELICCOPPER,:RELICCROWN,:RELICGOLD,:RELICSILVER,:RELICSTATUE, :RELICVASE,:REPEL,:RESETURGE,:REVIVALHERB,:REVIVE, :RICHMULCH,:SACREDASH,:SCOPELENS,:SHALOURSABLE, :SHELLBELL,:SHOALSALT,:SHOALSHELL,:SMOKEBALL,:SNOWBALL, :SODAPOP,:SOULDEW,:SPELLTAG,:STABLEMULCH,:STARDUST, :STARPIECE,:SUNSTONE,:SUPERPOTION,:SUPERREPEL,:SURPRISEMULCH, :SWEETHEART,:THUNDERSTONE,:TINYMUSHROOM,:TOXICORB,:TWISTEDSPOON, :UPGRADE,:WATERSTONE,:WHITEFLUTE,:XACCURACY, :XACCURACY2,:XACCURACY3,:XACCURACY6,:XATTACK,:XATTACK2, :XATTACK3,:XATTACK6,:XDEFEND,:XDEFEND2,:XDEFEND3, :XDEFEND6,:XDEFENSE,:XDEFENSE2,:XDEFENSE3,:XDEFENSE6, :XSPDEF,:XSPDEF2,:XSPDEF3,:XSPDEF6,:XSPATK, :XSPATK2,:XSPATK3,:XSPATK6,:XSPECIAL,:XSPECIAL2, :XSPECIAL3,:XSPECIAL6,:XSPEED,:XSPEED2,:XSPEED3, :XSPEED6,:YELLOWFLUTE,:YELLOWSHARD,:ZINC,:ADRENALINEORB, :BIGMALASADA,:BOTTLECAP,:PROTECTIVEPADS,:GOLDBOTTLECAP, :PINKNECTAR,:PURPLENECTAR,:REDNECTAR,:YELLOWNECTAR], 20 => [:CLEVERWING,:GENIUSWING,:HEALTHWING,:MUSCLEWING,:PRETTYWING, :RESISTWING,:SWIFTWING], 10 => [:AIRBALLOON,:BIGROOT,:BLUESCARF,:BRIGHTPOWDER,:CHOICEBAND, :CHOICESCARF,:CHOICESPECS,:DESTINYKNOT,:EXPERTBELT,:FOCUSBAND, :FOCUSSASH,:FULLINCENSE,:GREENSCARF,:LAGGINGTAIL,:LAXINCENSE, :LEFTOVERS,:LUCKINCENSE,:MENTALHERB,:METALPOWDER,:MUSCLEBAND, :ODDINCENSE,:PINKSCARF,:POWERHERB,:PUREINCENSE,:QUICKPOWDER, :REAPERCLOTH,:REDCARD,:REDSCARF,:RINGTARGET,:ROCKINCENSE, :ROSEINCENSE,:SEAINCENSE,:SHEDSHELL,:SILKSCARF,:SILVERPOWDER, :SMOOTHROCK,:SOFTSAND,:SOOTHEBELL,:WAVEINCENSE,:WHITEHERB, :WIDELENS,:WISEGLASSES,:YELLOWSCARF,:ZOOMLENS,[COLOR="red"]:ELECTRICSEED, :GRASSYSEED,:MISTYSEED,:PSYCHICSEED[/COLOR],:ICESTONE,:DISCOUNTCOUPON] }
Spoiler:################################################################################
# For 5 rounds, creates an electric terrain which boosts Electric-type moves and
# prevents Pokémon from falling asleep. Affects non-airborne Pokémon only.
# (Electric Terrain)
################################################################################
class PokeBattle_Move_154 < PokeBattle_Move
def pbEffect(attacker,opponent,hitnum=0,alltargets=nil,showanimation=true)
if @battle.field.effects[PBEffects::ElectricTerrain]>0
@battle.pbDisplay(_INTL("But it failed!"))
return -1
end
pbShowAnimation(@id,attacker,nil,hitnum,alltargets,showanimation)
@battle.field.effects[PBEffects::GrassyTerrain]=0
@battle.field.effects[PBEffects::MistyTerrain]=0
@battle.field.effects[PBEffects::PsychicTerrain]=0
if attacker.hasWorkingItem(:TERRAINEXTENDER)
@battle.field.effects[PBEffects::ElectricTerrain]=8
else
@battle.field.effects[PBEffects::ElectricTerrain]=5
end
@battle.pbDisplay(_INTL("An electric current runs across the battlefield!"))
return 0
end
end
################################################################################
# For 5 rounds, creates a grassy terrain which boosts Grass-type moves and heals
# Pokémon at the end of each round. Affects non-airborne Pokémon only.
# (Grassy Terrain)
################################################################################
class PokeBattle_Move_155 < PokeBattle_Move
def isHealingMove?
return true
end
def pbEffect(attacker,opponent,hitnum=0,alltargets=nil,showanimation=true)
if @battle.field.effects[PBEffects::GrassyTerrain]>0
@battle.pbDisplay(_INTL("But it failed!"))
return -1
end
pbShowAnimation(@id,attacker,nil,hitnum,alltargets,showanimation)
@battle.field.effects[PBEffects::ElectricTerrain]=0
@battle.field.effects[PBEffects::MistyTerrain]=0
@battle.field.effects[PBEffects::PsychicTerrain]=0
if attacker.hasWorkingItem(:TERRAINEXTENDER)
@battle.field.effects[PBEffects::GrassyTerrain]=8
else
@battle.field.effects[PBEffects::GrassyTerrain]=5
end
@battle.pbDisplay(_INTL("Grass grew to cover the battlefield!"))
return 0
end
end
################################################################################
# For 5 rounds, creates a misty terrain which weakens Dragon-type moves and
# protects Pokémon from status problems. Affects non-airborne Pokémon only.
# (Misty Terrain)
################################################################################
class PokeBattle_Move_156 < PokeBattle_Move
def pbEffect(attacker,opponent,hitnum=0,alltargets=nil,showanimation=true)
if @battle.field.effects[PBEffects::MistyTerrain]>0
@battle.pbDisplay(_INTL("But it failed!"))
return -1
end
pbShowAnimation(@id,attacker,nil,hitnum,alltargets,showanimation)
@battle.field.effects[PBEffects::ElectricTerrain]=0
@battle.field.effects[PBEffects::GrassyTerrain]=0
@battle.field.effects[PBEffects::PsychicTerrain]=0
if attacker.hasWorkingItem(:TERRAINEXTENDER)
@battle.field.effects[PBEffects::MistyTerrain]=8
else
@battle.field.effects[PBEffects::MistyTerrain]=5
end
@battle.pbDisplay(_INTL("Mist swirled about the battlefield!"))
return 0
end
end
################################################################################
# For 5 rounds, creates a psychic terrain which boosts Psychic-type moves and
# protects Pokémon from priority moves. Affects non-airborne Pokémon only.
# (Psychic Terrain)
################################################################################
class PokeBattle_Move_15A < PokeBattle_Move
def pbEffect(attacker,opponent,hitnum=0,alltargets=nil,showanimation=true)
if @battle.field.effects[PBEffects::PsychicTerrain]>0
@battle.pbDisplay(_INTL("But it failed!"))
return -1
end
pbShowAnimation(@id,attacker,nil,hitnum,alltargets,showanimation)
@battle.field.effects[PBEffects::ElectricTerrain]=0
@battle.field.effects[PBEffects::GrassyTerrain]=0
@battle.field.effects[PBEffects::MistyTerrain]=0
if attacker.hasWorkingItem(:TERRAINEXTENDER)
@battle.field.effects[PBEffects::PsychicTerrain]=8
else
@battle.field.effects[PBEffects::PsychicTerrain]=5
end
@battle.pbDisplay(_INTL("A psychic terrain was summoned!"))
return 0
end
end
where is Floral Healing
Spoiler:Code:pbShowAnimation(@id,attacker,opponent,hitnum,alltargets,showanimation) hpgain=((opponent.totalhp+1)/2).floor [COLOR="red"]hpgain=(opponent.totalhp*2/3).round if @battle.field.effects[PBEffects::GrassyTerrain]>0[/COLOR] opponent.pbRecoverHP(hpgain,true) @battle.pbDisplay(_INTL("{1}'s HP was restored.",opponent.pbThis)) return 0
In PokeBattle_Battle
Spoiler:in def pbpriority
above # Held berries/Leftovers/Black Sludge:Spoiler:Code:# Chose to use a move, excluding damaging Z-Moves pri=@choices[i][2].priority pri+=1 if @battlers[i].hasWorkingAbility(:PRANKSTER) && @choices[i][2].pbIsStatus? pri+=1 if @battlers[i].hasWorkingAbility(:GALEWINGS) && isConst?(@choices[i][2].type,PBTypes,:FLYING) pri+=3 if @battlers[i].hasWorkingAbility(:TRIAGE) && @choices[i][2].isHealingMove? && !isConst?(@choices[i][2].id,PBMoves,:AQUARING) [COLOR="red"]&& !isConst?(@choices[i][2].id,PBMoves,:GRASSYTERRAIN)[/COLOR] && !isConst?(@choices[i][2].id,PBMoves,:INGRAIN) && !isConst?(@choices[i][2].id,PBMoves,:LEECHSEED) && !isConst?(@choices[i][2].id,PBMoves,:PAINSPLIT) && !isConst?(@choices[i][2].id,PBMoves,:PRESENT) && !isConst?(@choices[i][2].id,PBMoves,:POLLENPUFF) end
below # Water SportSpoiler:Code:for i in priority next if i.fainted? [COLOR="red"]# Grassy Terrain (healing) if @field.effects[PBEffects::GrassyTerrain]>0 && !i.isAirborne? if i.effects[PBEffects::HealBlock]==0 hpgain=i.pbRecoverHP((i.totalhp/16).floor,true) pbDisplay(_INTL("{1}'s HP was restored.",i.pbThis)) if hpgain>0 end end[/COLOR] # Held berries/Leftovers/Black Sludge i.pbBerryCureCheck(true) if i.fainted? return if !i.pbFaint end end
Spoiler:Code:# Electric Terrain if @field.effects[PBEffects::ElectricTerrain]>0 for i in 0...4 user=@battlers[i] if user.hasWorkingItem(:ELECTRICSEED) user.pbIncreaseStatWithCause(PBStats::DEFENSE,1,user, PBItems.getName(user.item)) pbDisplay(_INTL("{1}'s {2} boosted its Defense.", user.pbThis,PBItems.getName(user.item))) end end @field.effects[PBEffects::ElectricTerrain]-=1 if @field.effects[PBEffects::ElectricTerrain]==0 pbDisplay(_INTL("The electric current disappeared from the battlefield.")) PBDebug.log("[End of effect] Electric Terrain ended") end end # Grassy Terrain if @field.effects[PBEffects::GrassyTerrain]>0 for i in 0...4 user=@battlers[i] if user.hasWorkingItem(:GRASSYSEED) user.pbIncreaseStatWithCause(PBStats::DEFENSE,1,user, PBItems.getName(user.item)) pbDisplay(_INTL("{1}'s {2} boosted its Defense.", user.pbThis,PBItems.getName(user.item))) end end @field.effects[PBEffects::GrassyTerrain]-=1 if @field.effects[PBEffects::GrassyTerrain]==0 pbDisplay(_INTL("The grass disappeared from the battlefield.")) PBDebug.log("[End of effect] Grassy Terrain ended") end end # Misty Terrain if @field.effects[PBEffects::MistyTerrain]>0 for i in 0...4 user=@battlers[i] if user.hasWorkingItem(:MISTYSEED) user.pbIncreaseStatWithCause(PBStats::SPDEF,1,user, PBItems.getName(user.item)) pbDisplay(_INTL("{1}'s {2} boosted its Special Defense.", user.pbThis,PBItems.getName(user.item))) end end @field.effects[PBEffects::MistyTerrain]-=1 if @field.effects[PBEffects::MistyTerrain]==0 pbDisplay(_INTL("The mist disappeared from the battlefield.")) PBDebug.log("[End of effect] Misty Terrain ended") end end # Psychic Terrain if @field.effects[PBEffects::PsychicTerrain]>0 for i in 0...4 user=user=@battlers[i] if user.hasWorkingItem(:PSYCHICSEED) user.pbIncreaseStatWithCause(PBStats::SPDEF,1,user, PBItems.getName(user.item)) pbDisplay(_INTL("{1}'s {2} boosted its Special Defense.", user.pbThis,PBItems.getName(user.item))) end end @field.effects[PBEffects::PsychicTerrain]-=1 if @field.effects[PBEffects::PsychicTerrain]==0 pbDisplay(_INTL("The battlefield returned to its normal state.")) PBDebug.log("[End of effect] Misty Terrain ended") end end
Hi. I have all 233 abilities scripted and functional with none of them having major bugs. If you want a certain ability, you can request it here, and I'll reply to you my original code, or a link, if someone else had posted it already. Please, do a search before posting, and if you find that no one had posted your wanted ability, then make the request.
Edit: Ok, maybe I have some unnoticed bugs, but no ability will remain unsolved in this thread.
Hello!
can you share your abilities? I want to offer you a couple of engines with Russian Pokemon, I really need your help!
contact me through [email protected]
or write to me in pm
All the abilities have been posted you can check here. If you don't find it here, all you need to do is go ob Google and search for "XYZ Pokemon Essentials" where XYZ is the name of the ability, move or Item you need.Please, do a search before posting, and if you find that no one had posted your wanted ability, then make the request.