- 1,224
- Posts
- 11
- Years
- Omnipresence
- Seen Aug 8, 2023
After I put all his codes in nothing happened. So I took the code you made and put it below his in
PokeBattle_Battler.
Problem being he doesn't change back to shield form when using king's shield. Not sure where I messed up ether.
Code:#Agislash Form Change if isConst?(self.ability,PBAbilities,:STANCECHANGE) && isConst?(self.species,PBSpecies,:AEGISLASH) && hp>0 && thismove.basedamage > 0 @pokemon.form=1 pbCheckForm end #Agislash Form Change if isConst?(self.ability,PBAbilities,:STANCECHANGE) && isConst?(self.species,PBSpecies,:AEGISLASH) && hp>0 && thismove.function==135 #Where XXX is the function number @pokemon.form=0 pbCheckForm end
This code you posted. I didn't put it in. What dies it do? Is it necessary for this to work properly?
Code:if $game_switches[68]==true && (thismove.flags&0x01)!=0 #King's Shield if isConst?(opponent.ability,PBAbilities,:CONTRARY) if opponent.pbCanIncreaseStatStage?(PBStats::ATTACK,false) opponent.pbIncreaseStat(PBStats::ATTACK,1,false,showanim) @battle.pbDisplay(_INTL("{1} protected itself!",target.pbThis)) @battle.successStates[user.index].protected=true return false end elsif !isConst?(opponent.ability,PBAbilities,:CONTRARY) if opponent.pbCanReduceStatStage?(PBStats::ATTACK,false) opponent.pbReduceStat(PBStats::ATTACK,1,false,showanim) @battle.pbDisplay(_INTL("{1} protected itself!",target.pbThis)) @battle.successStates[user.index].protected=true return false end end end
No, it's just the coding I made for King's Shield itself. I don't think it work properly on second thought.