- 60
- Posts
- 5
- Years
- The Ozone Layer
- Seen Feb 9, 2023
Hey forums!
I've been working on a pair of abilities (partly for fun, partly to use for a game in the future), but I am not super confident in Ruby coding, and I was hoping to get some help with the scripts!
Ability 1: Verdure (Name under development a.k.a still bad)
Basically the idea is to have a terrain and a weather condition summoned on entry/on gaining this ability. I want the effects of drought and Grassy terrain for this ability particularly.
So far I have the basic idea jotted, and As of posting this I will be reading through the Basics of Ruby code to try and refine it.
Sorry if it is painfully filled with errors, as I say I am fairly new to this and I am still working on it! :)
The second ability is Tetratox:
The idea is to accelerate the effects of bad poisoning when the Pokemon is hit with a contact move by the owner of this ability
I only just started this, so it's unfinished, but the basic gist, again is here.
Again, I really apologise for the poor structure and lack of completion, but I am working on it and I wanted to run the code by some pro's to get some assistance!
I've been working on a pair of abilities (partly for fun, partly to use for a game in the future), but I am not super confident in Ruby coding, and I was hoping to get some help with the scripts!
Ability 1: Verdure (Name under development a.k.a still bad)
Basically the idea is to have a terrain and a weather condition summoned on entry/on gaining this ability. I want the effects of drought and Grassy terrain for this ability particularly.
So far I have the basic idea jotted, and As of posting this I will be reading through the Basics of Ruby code to try and refine it.
Code:
#(PokeBattle_Battle)
if self.hasWorkingAbility(:VERDURE)
@battle.terrain=PBTerrain(:GRASSYTERRAIN)
@battle.terrainduration=-1
@battle.pbCommonAnimation("GrassyTerrain",nil,nil)
@battle.weather=PBWeather(:HARSHSUN)
@battle.weatherduration=-1
@battle.pbCommonAnimation("HarshSunlight",nil,nil)
@battle.pbDisplay(_INTL("#{pbThis}'s Verdure has caused Harsh Sunlight and Grassy Terrain!"))
PBDebug.log([Ability triggered]"#{pbThis}'s Verdure")
end
#===========================================================
#This below is the code for Primordialweather Harsh Sun, which will be the base for verdure..sort of
when PBWeather::HARSHSUN
for i in 0...4
if isConst?(@battlers[i].ability,PBAbilities,:VERDURE) &&
!@battlers[i].fainted?
hasabil=true; break
end
if !hasabil
@weather=0
pbDisplayBrief("The harsh sunlight faded!")
end
end
Sorry if it is painfully filled with errors, as I say I am fairly new to this and I am still working on it! :)
The second ability is Tetratox:
The idea is to accelerate the effects of bad poisoning when the Pokemon is hit with a contact move by the owner of this ability
I only just started this, so it's unfinished, but the basic gist, again is here.
Code:
if hasWorkingAbility(:TETRATOX) && onContact
for 1 in 0...4
if pbIsOpposing?(self) && [email protected][self].feinted && @battle.battlers[self].pbstatus(:POISON){
oncontact{
@battle.battler[self].pbstatus(:POISON) dmglevel=+1
PBDebug.log([Ability triggered]"#{pbThis}'s Tetratox Accellerated the poisoning!")
}
else
#physical move poisons the target or, if they are poisoned, it accelerates it, making it badly poisoned
end
end
end
Again, I really apologise for the poor structure and lack of completion, but I am working on it and I wanted to run the code by some pro's to get some assistance!