- Joined
- Nov 16, 2025
- Posts
- 1
Been trying to figure this out for 7 hours straight and I'm sure I'm missing something embarrassingly simple. Trying to make an ability called Brimstone that changes the type for rock type moves to fire type and gives your fire moves a chance to burn. The first half was simple, but I just can't figure out the burn statis chance for fire type moves. Here is the code.
Battle::AbilityEffects::OnDealingHit.add(:BRIMSTONE,
proc { |ability, user, target, move, battle|
next if type = :FIRE
next if battle.pbRandom(100) >= 30
battle.pbShowAbilitySplash(user)
if target.hasActiveAbility?(:SHIELDDUST) && !battle.moldBreaker
battle.pbShowAbilitySplash(target)
if !Battle::Scene::USE_ABILITY_SPLASH
battle.pbDisplay(_INTL("{1} is unaffected!", target.pbThis))
end
battle.pbHideAbilitySplash(target)
elsif target.pbCanBurn?(user, Battle::Scene::USE_ABILITY_SPLASH)
msg = nil
if !Battle::Scene::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)
}
)
Battle::AbilityEffects::OnDealingHit.add(:BRIMSTONE,
proc { |ability, user, target, move, battle|
next if type = :FIRE
next if battle.pbRandom(100) >= 30
battle.pbShowAbilitySplash(user)
if target.hasActiveAbility?(:SHIELDDUST) && !battle.moldBreaker
battle.pbShowAbilitySplash(target)
if !Battle::Scene::USE_ABILITY_SPLASH
battle.pbDisplay(_INTL("{1} is unaffected!", target.pbThis))
end
battle.pbHideAbilitySplash(target)
elsif target.pbCanBurn?(user, Battle::Scene::USE_ABILITY_SPLASH)
msg = nil
if !Battle::Scene::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)
}
)