Advertiser Content

Scripting Question Need help with creating abilities

Started by DarkBlueInferno August 28th, 2019 1:33 AM
  • 878 views
  • 4 replies
Seen September 1st, 2019
Posted August 28th, 2019
3 posts
56 Days
Hello, I'm new to scripting and I've been trying to create a new ability, but i keep hitting a wall. Can someone explain to me how I would add a move like levitate, but for immunity to fairy types? I've already entered the ability in the abilities.txt and I've tried looking at other threads and mimicking the scripting, but nothing is working.

If anyone could help it would be greatly appreciated.
Seen September 1st, 2019
Posted August 28th, 2019
3 posts
56 Days
Good point, I read somewhere else that it would go above the wonder guard script, but i wasn't sure which was the start of the script so here is where i put it: (above the mentioning of wonder guard and after the end of the scripts relating to the levitate script)

if target.effects[PBEffects::Telekinesis]>0
@battle.pbDisplay(_INTL("{1} makes Ground moves miss with Telekinesis!",target.pbThis))
return false
end
end
if isConst?(type,PBTypes,:FAIRY) && !target.hasWorkingItem(:RINGTARGET)
if !user.hasMoldBreaker && (target.hasWorkingAbility(:OBLIVION))
@battle.pbDisplay(_INTL("{1} makes FAIRY moves miss with OBLIVION!",target.pbThis,PBAbilities.getName(target.ability)))
return false
end
end
#### KUROTSUNE - 029 - START
if target.hasWorkingAbility(:WONDERGUARD) &&
typemod<=4 &&
type>=0 &&
!(target.moldbroken)
#### KUROTSUNE - 029 - END
@battle.pbDisplay(_INTL("{1} avoided damage with Wonder Guard!",target.pbThis))
return false
end
Advertiser Content