sonicfan7895
Just a dude, I guess
- 120
- Posts
- 14
- Years
- He/Him/His
- Akala Island, Alola
- Seen Feb 22, 2025
Hello all! My last post regarding this matter got necro-ed and I thought I might try this again.
I am working on a couple of games in Essentials, and I had the idea to make some abilities like Refrigerate and Pixilate, except they change a move into a dual-typing (i.e. Flying Press). I feel that this time around I go into great detail and actually show what's going on instead of being vague about it.
Here's my current code in PokeBattle_Move (lines 78-108):
From my current PokeBattle_Move (lines 659-667):
And from my current Pokemon_MegaEvolution (lines 1743-1768), where I intend to place the ability:
Seems all well and good, especially on paper. But then, when I go to actually use the move with my intended Mega, I get this error (this is a picture of the said error, I promise):
https://drive.google.com/open?id=0B7naGiszoz_raklUVlJzTWxvT2c
What can I do to remedy this? I really want this to be a thing in my team's game...
Any help is appreciated greatly! Thanks in advance!
I am working on a couple of games in Essentials, and I had the idea to make some abilities like Refrigerate and Pixilate, except they change a move into a dual-typing (i.e. Flying Press). I feel that this time around I go into great detail and actually show what's going on instead of being vague about it.
Spoiler:
(KEEP IN MIND, FROM THIS POINT ON, THE CODES I WANT TO ADD WILL BE [S-HIGHLIGHT]HIGHLIGHTED[/S-HIGHLIGHT].)
Here's my current code in PokeBattle_Move (lines 78-108):
Code:
def pbModifyType(type,attacker,opponent)
if type>=0
if attacker.hasWorkingAbility(:NORMALIZE) && hasConst?(PBTypes,:NORMAL)
type=getConst(PBTypes,:NORMAL)
elsif isConst?(type,PBTypes,:NORMAL)
if attacker.hasWorkingAbility(:AERILATE) && hasConst?(PBTypes,:FLYING)
type=getConst(PBTypes,:FLYING)
@powerboost=true
elsif attacker.hasWorkingAbility(:REFRIGERATE) && hasConst?(PBTypes,:ICE)
type=getConst(PBTypes,:ICE)
@powerboost=true
elsif attacker.hasWorkingAbility(:PIXILATE) && hasConst?(PBTypes,:FAIRY)
type=getConst(PBTypes,:FAIRY)
@powerboost=true
elsif attacker.hasWorkingAbility(:CORRUPTION) && hasConst?(PBTypes,:DARK)
type=getConst(PBTypes,:DARK)
@powerboost=true
elsif attacker.hasWorkingAbility(:METALLURGY) && hasConst?(PBTypes,:STEEL)
type=getConst(PBTypes,:STEEL)
@powerboost=true
elsif attacker.hasWorkingAbility(:MAGMARIZE) && hasConst?(PBTypes,:FIRE)
type=getConst(PBTypes,:FIRE)
@powerboost=true
[S-HIGHLIGHT]elsif attacker.hasWorkingAbility(:DEMONIZE) && hasConst?(PBTypes,:GHOST,:DARK)
type=getConst(PBTypes,:GHOST,:DARK)
@powerboost=true[/S-HIGHLIGHT]
end
end
end
return type
end
From my current PokeBattle_Move (lines 659-667):
Code:
if (attacker.hasWorkingAbility(:AERILATE) ||
attacker.hasWorkingAbility(:REFRIGERATE) ||
attacker.hasWorkingAbility(:CORRUPTION) ||
attacker.hasWorkingAbility(:METALLURGY) ||
attacker.hasWorkingAbility(:MAGMARIZE) ||
[S-HIGHLIGHT]attacker.hasWorkingAbility(:DEMONIZE)[/S-HIGHLIGHT] ||
attacker.hasWorkingAbility(:PIXILATE)) && @powerboost
damagemult=(damagemult*1.3).round
end
And from my current Pokemon_MegaEvolution (lines 1743-1768), where I intend to place the ability:
Code:
MultipleForms.register(:ZOROARK,{
"getMegaForm"=>proc{|pokemon|
next 1 if isConst?(pokemon.item,PBItems,:ZOROITE)
next
},
"getBaseStats"=>proc{|pokemon|
next [60,80,80,150,150,85] if pokemon.form==1
next
},
"getAbilityList"=>proc{|pokemon|
next [[[S-HIGHLIGHT]getID(PBAbilities,:DEMONIZE)[/S-HIGHLIGHT],0]] if pokemon.form==1
next
},
"height"=>proc{|pokemon|
next 19 if pokemon.form==1
next
},
"weight"=>proc{|pokemon|
next 895 if pokemon.form==1
next
},
"type2"=>proc{|pokemon|
next getID(PBTypes,:GHOST) if pokemon.form==1
next
},
})
Seems all well and good, especially on paper. But then, when I go to actually use the move with my intended Mega, I get this error (this is a picture of the said error, I promise):
https://drive.google.com/open?id=0B7naGiszoz_raklUVlJzTWxvT2c
What can I do to remedy this? I really want this to be a thing in my team's game...
Any help is appreciated greatly! Thanks in advance!
Last edited by a moderator: