- 79
- Posts
- 9
- Years
- Seen Jan 12, 2024
Hello, I'm trying to rebalance Stealth Rock so that it no longer takes quad ineffectiveness or quad effectiveness into account, instead dealing 1/16th if Rock is Not Very Effective, 1/8th if Neutral, and 1/4th if Super Effective. This is the script I have so far:
It successfully deals 1/16th HP if Rock is Not Very Effective and 1/8th if neutral, however Super Effective also deals 1/8th damage. What changes should I make? Thanks!
Spoiler:
Code:
if pkmn.pbOwnSide.effects[PBEffects::StealthRock] && !pkmn.fainted?
if !(pkmn.hasWorkingAbility(:MAGICGUARD) ||
pkmn.hasWorkingItem(:HEAVYDUTYBOOTS))
atype=getConst(PBTypes,:ROCK) || 0
eff=PBTypes.getCombinedEffectiveness(atype,pkmn.type1,pkmn.type2,pkmn.effects[PBEffects::Type3])
if eff>0
PBDebug.log("[Entry hazard] #{pkmn.pbThis} triggered Stealth Rock")
@scene.pbDamageAnimation(pkmn,0)
if eff<8
pkmn.pbReduceHP((pkmn.totalhp/16).floor)
elsif eff=8
pkmn.pbReduceHP((pkmn.totalhp/8).floor)
elsif eff>8
pkmn.pbReduceHP((pkmn.totalhp/4).floor)
end
pbDisplayPaused(_INTL("Pointed stones dug into {1}!",pkmn.pbThis))
end
end
end
It successfully deals 1/16th HP if Rock is Not Very Effective and 1/8th if neutral, however Super Effective also deals 1/8th damage. What changes should I make? Thanks!