rigbycwts
Hmm, hmm.
- 98
- Posts
- 12
- Years
- Seen Feb 22, 2019
Note: To avoid breaking codes, set the thread to Printable Version. This requires Essentials 16.2.
Shore Up:
Put on PokeBattle_MoveEffects:
PBS:
First Impression:
In PokeBattle_MoveEffects:
PBS:
Baneful Bunker:
In PokeBattle_MoveEffects:
In PBEffects, after Yawn:
In PokeBattle_Battler, below Spiky Shield:
Sparkling Aria:
In PokeBattle_MoveEffects:
Psychic Terrain: https://www.pokecommunity.com/posts/9519058/
Shore Up:
Spoiler:
Put on PokeBattle_MoveEffects:
Code:
################################################################################
# Heals user by an amount depending on the weather. (Shore Up)
################################################################################
class PokeBattle_Move_159 < PokeBattle_Move
def isHealingMove?
return true
end
def pbEffect(attacker,opponent,hitnum=0,alltargets=nil,showanimation=true)
if attacker.hp==attacker.totalhp
@battle.pbDisplay(_INTL("{1}'s HP is full!",attacker.pbThis))
return -1
end
hpgain=0
if @battle.pbWeather==PBWeather::SANDSTORM
hpgain=(attacker.totalhp*2/3).floor
else
hpgain=(attacker.totalhp/2).floor
end
pbShowAnimation(@id,attacker,nil,hitnum,alltargets,showanimation)
attacker.pbRecoverHP(hpgain,true)
@battle.pbDisplay(_INTL("{1}'s HP was restored.",attacker.pbThis))
return 0
end
end
Code:
622,SHOREUP,Shore Up,159,0,GROUND,Status,0,5,0,10,0,d,"The user regains up to half of its max HP. It restores more HP in a sandstorm."
First Impression:
Spoiler:
In PokeBattle_MoveEffects:
Code:
################################################################################
# Fails if this isn't the user's first turn. (First Impression)
################################################################################
class PokeBattle_Move_15A < PokeBattle_Move
def pbMoveFailed(attacker,opponent)
return (attacker.turncount>1)
end
end
Code:
623,FIRSTIMPRESSION,First Impression,15A,90,BUG,Physical,100,10,100,00,2,abef,"Although this move has great power, it only works the first turn the user is in battle."
Baneful Bunker:
Spoiler:
In PokeBattle_MoveEffects:
Code:
################################################################################
# User is protected against damaging moves this round. Poisons the
# user of a stopped contact move. (Baneful Bunker)
################################################################################
class PokeBattle_Move_15B < PokeBattle_Move
def pbEffect(attacker,opponent,hitnum=0,alltargets=nil,showanimation=true)
if attacker.effects[PBEffects::BanefulBunker]
@battle.pbDisplay(_INTL("But it failed!"))
return -1
end
ratesharers=[
0xAA, # Detect, Protect
0xAB, # Quick Guard
0xAC, # Wide Guard
0xE8, # Endure
0x14B, # King's Shield
0x14C # Spiky Shield
]
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 && # Chose a move
!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("But it failed!"))
return -1
end
pbShowAnimation(@id,attacker,nil,hitnum,alltargets,showanimation)
attacker.effects[PBEffects::BanefulBunker]=true
attacker.effects[PBEffects::ProtectRate]*=2
@battle.pbDisplay(_INTL("{1} protected itself!",attacker.pbThis))
return 0
end
end
Code:
BanefulBunker = 109
Code:
# Baneful Bunker
if target.effects[PBEffects::BanefulBunker] && thismove.canProtectAgainst? &&
!target.effects[PBEffects::ProtectNegation]
@battle.pbDisplay(_INTL("{1} protected itself!",target.pbThis))
@battle.successStates[user.index].protected=true
PBDebug.log("[Move failed] #{user.pbThis}'s Baneful Bunker stopped the attack!")
if thismove.isContactMove? && !user.isFainted? && user.pbCanPoison?(nil,false)
PBDebug.log("#{target.pbThis} poisoned by Baneful Bunker")
user.pbPoison(target,_INTL("{1} was poisoned!",target.pbThis))
end
return false
end
Sparkling Aria:
Spoiler:
In PokeBattle_MoveEffects:
Code:
################################################################################
# Inflicts damage to the target. If the target is burned, the burn is healed.
# (Sparkling Aria)
################################################################################
class PokeBattle_Move_15C < PokeBattle_Move
def pbEffectAfterHit(attacker,opponent,turneffects)
if !opponent.isFainted? && opponent.damagestate.calcdamage>0 &&
!opponent.damagestate.substitute && opponent.status==PBStatuses::BURN
opponent.pbCureStatus
end
end
end
Psychic Terrain: https://www.pokecommunity.com/posts/9519058/
Last edited: