Okay, well there must be a place where PBEffects::KingsShield is mentioned which turns off the effect at the end of the turn, but you haven't copied that bit for yours.
###############################################################################
# El usuario se protege contra movimientos de daño esta ronda.
# Reduce la Velocidad del usuario de un movimiento de contacto en 2 niveles.
# (Escudo Gélido/Icy Shield)
################################################################################
class PokeBattle_Move_20A < PokeBattle_Move
def pbEffect(attacker,opponent,hitnum=0,alltargets=nil,showanimation=true)
if attacker.effects[PBEffects::IcyShield]
@battle.pbDisplay(_INTL("¡Pero falló!"))
return -1
end
ratesharers=[
0xAA, # Detección, Protección
0xAB, # Anticipo
0xAC, # Vastaguardia
0xE8, # Aguante
0x14B, # Escudo Real
0x14C, # Barrera Espinosa
0x184, # Obstruct
0x20A, # IcyShield
0x20B # MeteorShield
]
if !ratesharers.include?(PBMoveData.new(attacker.lastMoveUsed).function)
attacker.effects[PBEffects::ProtectRate]=1
end
unmoved=false
for poke in @battle.battlers
next if poke.index==attacker.index
if @battle.choices[poke.index][0]==1 && # Escoge un movimiento
!poke.hasMovedThisRound?
unmoved=true; break
end
end
if !unmoved ||
(!USENEWBATTLEMECHANICS &&
@battle.pbRandom(65536)>=(65536/attacker.effects[PBEffects::ProtectRate]).floor)
attacker.effects[PBEffects::ProtectRate]=1
@battle.pbDisplay(_INTL("¡Pero falló!"))
return -1
end
pbShowAnimation(@id,attacker,nil,hitnum,alltargets,showanimation)
attacker.effects[PBEffects::IcyShield]=true
attacker.effects[PBEffects::ProtectRate]*=2
@battle.pbDisplay(_INTL("¡{1} se está protegiendo!",attacker.pbThis))
return 0
end
end
###############################################################################
# El usuario se protege contra movimientos de daño esta ronda.
# Reduce la Defensa del usuario de un movimiento de contacto en 2 niveles.
# (Escudo Estelar/Meteor Shield)
################################################################################
class PokeBattle_Move_20B < PokeBattle_Move
def pbEffect(attacker,opponent,hitnum=0,alltargets=nil,showanimation=true)
if attacker.effects[PBEffects::MeteorShield]
@battle.pbDisplay(_INTL("¡Pero falló!"))
return -1
end
ratesharers=[
0xAA, # Detección, Protección
0xAB, # Anticipo
0xAC, # Vastaguardia
0xE8, # Aguante
0x14B, # Escudo Real
0x14C, # Barrera Espinosa
0x184, # Obstruct
0x20A, # IcyShield
0x20B # MeteorShield
]
if !ratesharers.include?(PBMoveData.new(attacker.lastMoveUsed).function)
attacker.effects[PBEffects::ProtectRate]=1
end
unmoved=false
for poke in @battle.battlers
next if poke.index==attacker.index
if @battle.choices[poke.index][0]==1 && # Escoge un movimiento
!poke.hasMovedThisRound?
unmoved=true; break
end
end
if !unmoved ||
(!USENEWBATTLEMECHANICS &&
@battle.pbRandom(65536)>=(65536/attacker.effects[PBEffects::ProtectRate]).floor)
attacker.effects[PBEffects::ProtectRate]=1
@battle.pbDisplay(_INTL("¡Pero falló!"))
return -1
end
pbShowAnimation(@id,attacker,nil,hitnum,alltargets,showanimation)
attacker.effects[PBEffects::MeteorShield]=true
attacker.effects[PBEffects::ProtectRate]*=2
@battle.pbDisplay(_INTL("¡{1} se está protegiendo!",attacker.pbThis))
return 0
end
end
Can you correct the wrong parts?