- 465
- Posts
- 8
- Years
- Seen Jun 17, 2024
So long story short, i have rangers and the stylers/discs in my game and wanting to make them into one of the regions gimmicks.
idea is, after wild battles if you faint or run away theres a chance the pokemon will want to assist you, got this figured out already.
now in battle there is a partner effect and depending on your partners type it'll be a different effect, e.g. fire types burn.
now i have the effect, and detecting if its a fire type partner, but it gives the effect to ALL pokemon and burns them all.
two bits of code i have are;
This is above Download and below battery/Intimidate in PokeBattle_Battler
then;
this is Above aqua ring and below the healing of grassy terrain in PokeBattle_Battle.
i just want the foe to get the partner effect thus them getting burned but not having luck (also due to the first parts placing the ability popups appear every bit of the turn with EBS, since its in that bit of ability code even tho it should only trigger once.)
idea is, after wild battles if you faint or run away theres a chance the pokemon will want to assist you, got this figured out already.
now in battle there is a partner effect and depending on your partners type it'll be a different effect, e.g. fire types burn.
now i have the effect, and detecting if its a fire type partner, but it gives the effect to ALL pokemon and burns them all.
two bits of code i have are;
Code:
if $PokemonGlobal.PartnerObtained==true # Detects if the player has a partner
# Partner Fire effect initialize
if self.pbOwnSide.effects[PBEffects::PartnerEffect]!=-1 && [email protected]?(@index)
self.pbOwnSide.effects[PBEffects::PartnerEffect]=-1
partnername=PBSpecies.getName($PokemonGlobal.PartnerSpecies)
@battle.pbDisplay(_INTL("{1} is Assisting You!",partnername))
end
end
then;
Code:
# Partner Effects
# Fire type 1 partner, Burning.
for i in 0...2
if sides[i].effects[PBEffects::PartnerEffect]==-1 && $PokemonGlobal.PartnerType1==getConst(PBTypes,:FIRE)
for i in priority
next if i.isFainted?
if i.pbCanBurn?(nil,false) #100% Chance for debugging
#if rand(3)==0 && i.pbCanBurn?(nil,false)
partnername=PBSpecies.getName($PokemonGlobal.PartnerSpecies)
i.pbBurn(nil,_INTL("{1} was Burnt by {2}'s Assist!",i.pbThis,partnername))
end
end
end
end
i just want the foe to get the partner effect thus them getting burned but not having luck (also due to the first parts placing the ability popups appear every bit of the turn with EBS, since its in that bit of ability code even tho it should only trigger once.)