Advertiser Content

Scripting Question Is This Correct?

Started by clawort June 8th, 2019 3:31 PM
  • 925 views
  • 4 replies

clawort

Male
Australia
Seen 4 Weeks Ago
Posted 4 Weeks Ago
82 posts
137 Days
It's for abilities called Warm-Blooded and Cold-Blooded. They change a certain Pokemon's form depending on whether they are in Sunny weather or Hail weather, in a particular environment, or whether they are holding a Fire Stone or an Ice Stone.
# Warm-Blooded
if isConst?(self.species,PBSpecies,:THERMEWT) ||
isConst?(self.species,PBSpecies,:THERMAGUANA)
if self.hasWorkingAbility(:WARMBLOODED) &&
(@battle.pbWeather==PBWeather::SUNNYDAY ||
@battle.pbWeather==PBWeather::HARSHSUN ||
@environment==PBEnvironment::Sand ||
@environment==PBEnvironment::Volcano ||
isConst?(self.item,PBItems,:FIRESTONE))
if self.form!=1
self.form=1; transformed=true
end
else
if self.form!=0
self.form=0; transformed=true
end
end
end
# Cold-Blooded
if isConst?(self.species,PBSpecies,:THERMEWT) ||
isConst?(self.species,PBSpecies,:THERMAGUANA)
if self.hasWorkingAbility(:COLDBLOODED) &&
(@battle.pbWeather==PBWeather::HAIL ||
@environment==PBEnvironment::Snow ||
isConst?(self.item,PBItems,:ICESTONE))
if self.form!=1
self.form=1; transformed=true
end
else
if self.form!=0
self.form=0; transformed=true
end
end
end
Can someone check this to see if it's correct or not?

Diverscope

Pardon me

Male
Germany
Seen 11 Hours Ago
Posted 3 Weeks Ago
139 posts
6.3 Years
Uhm, why don't you check it yourself? Also put your code in a code-tag to avoid the forum from breaking the code.
Advertiser Content