• Do not use Discord to host any images you post, these links expire quickly! You can learn how to add images to your posts here.
  • Reminder: AI-generated content is not allowed on the forums per the Rules and Regulations. Please contact us if you have any questions!

Would appreciate help with my custom ability

CrimsonWanderer

Rookie
Member
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)
}
)
 
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)
}
)
next if type = :FIRE Is this supposed to check that a move is Fire type? There are a couple of things wrong with this line then. It needs to be next if move.type != :FIRE
 
next if type = :FIRE Is this supposed to check that a move is Fire type? There are a couple of things wrong with this line then. It needs to be next if move.type != :FIRE
I think it should be move.clacType or something like that.
if it just be move.type, I'm pretty sure it can't trigger the effect for the fire moves that turned from rock.
 
Back
Top