- 4
- Posts
- 6
- Years
- Seen Jul 19, 2022
SOLVED!!!
Just in case anyone else has this weird specific quetion, here was my problem:
I think the issue was that i was trying to string together the type change and the burning. Seperating them worked, at least i think it did. Here's the code for non water type moves having a chance to burn in case anyone wants it!!
I am trying to make an ability that makes all non water type moves fire and all non water type moves have a chance to burn. I've tried to reverse engineer the scripting for refrigerate and poison touch. I've gotten the moves to be fire type, but I can't get them to burn. Here's what I've got:
Just in case anyone else has this weird specific quetion, here was my problem:
I think the issue was that i was trying to string together the type change and the burning. Seperating them worked, at least i think it did. Here's the code for non water type moves having a chance to burn in case anyone wants it!!
Spoiler:
BattleHandlers::UserAbilityOnHit.add(:SPICYDUST,
proc { |ability,user,target,move,battle|
next if move.type == :WATER
next if battle.pbRandom(100)>=30
battle.pbShowAbilitySplash(user)
if target.hasActiveAbility?(:SHIELDDUST) && !battle.moldBreaker
battle.pbShowAbilitySplash(target)
if !PokeBattle_SceneConstants::USE_ABILITY_SPLASH
battle.pbDisplay(_INTL("{1} is unaffected!",target.pbThis))
end
battle.pbHideAbilitySplash(target)
elsif target.pbCanBurn?(user,PokeBattle_SceneConstants::USE_ABILITY_SPLASH)
msg = nil
if !PokeBattle_SceneConstants::USE_ABILITY_SPLASH
msg = _INTL("{1}'s {2} burned {3}!",user.pbThis,user.abilityName,target.pbThis(true))
end
target.pbBurn(user,msg)
end
battle.pbHideAbilitySplash(user)
}
)
--------------------------------------------------------------------------------------------
original post:
original post:
I am trying to make an ability that makes all non water type moves fire and all non water type moves have a chance to burn. I've tried to reverse engineer the scripting for refrigerate and poison touch. I've gotten the moves to be fire type, but I can't get them to burn. Here's what I've got:
Spoiler:
BattleHandlers::MoveBaseTypeModifierAbility.add(:SPICYDUST,
proc { |ability,user,move,type|
next if type == :WATER || !GameData::Type.exists?(:FIRE)
move.powerBoost = true
next :FIRE
next if battle.pbRandom(100)>=50
battle.pbShowAbilitySplash(user)
if target.hasActiveAbility?(:SHIELDDUST) && !battle.moldBreaker
battle.pbShowAbilitySplash(target)
if !PokeBattle_SceneConstants::USE_ABILITY_SPLASH
battle.pbDisplay(_INTL("{1} is unaffected!",target.pbThis))
end
battle.pbHideAbilitySplash(target)
elsif target.pbCanBurn?(user,PokeBattle_SceneConstants::USE_ABILITY_SPLASH)
msg = nil
if !PokeBattle_SceneConstants::USE_ABILITY_SPLASH
msg = _INTL("{1}'s {2} burned {3}!",user.pbThis,user.abilityName,target.pbThis(true))
end
target.pbBurn(user,msg)
end
battle.pbHideAbilitySplash(user)
Last edited: