- 825
- Posts
- 9
- Years
- The Dissa Region
- Seen Oct 7, 2024
Pollen Puff
Floral Healing
Strength Sap
Gear Up
Speed Swap
Shore Up
Spotlight
Revelation Dance
(originally had this one coded a lot more complicated, where it checks to be sure the attacker is Oricorio, then goes by the form's primary type. Turns out it goes by primary type regardless of species.)
Instruct
Code:
################################################################################
# If the target is an ally, heals the target for the amount of damage that would
# have been dealt. If target is an opponent, damages them normally.
################################################################################
class PokeBattle_Move_1B3 < PokeBattle_Move
def pbEffect(attacker,opponent,hitnum=0,alltargets=nil,showanimation=true)
if attacker.pbPartner != nil
if attacker.pbPartner == opponent
damage=pbCalcDamage(attacker,opponent,0,hitnum)
opponent.pbRecoverHP(damage,true)
return 0
end
end
return super(attacker,opponent,hitnum,alltargets,showanimation)
end
end
Floral Healing
Code:
################################################################################
# Heals target by 1/2 of its max HP.
# In Grassy Terrain, heals target by 3/4 of its max HP.
################################################################################
class PokeBattle_Move_1B4 < PokeBattle_Move
def pbEffect(attacker,opponent,hitnum=0,alltargets=nil,showanimation=true)
if opponent.effects[PBEffects::HealBlock]>0
@battle.pbDisplay(_INTL("{1} can't use {2} because of Heal Block!",attacker.pbThis,name))
return -1
end
if opponent.hp==opponent.totalhp
@battle.pbDisplay(_INTL("{1}'s HP is full!",opponent.pbThis))
return -1
end
pbShowAnimation(@id,attacker,opponent,hitnum,alltargets,showanimation)
inc=0.5
inc=0.75 if @battle.field.effects[PBEffects::GrassyTerrain]>0
opponent.pbRecoverHP(((opponent.totalhp+1)*inc).floor,true)
@battle.pbDisplay(_INTL("{1}'s HP was restored.",opponent.pbThis))
return 0
end
end
Strength Sap
Code:
################################################################################
# Heals the user for an amount equal to the target's effective Attack stat
# Lowers the target's Attack by 1 stage
################################################################################
class PokeBattle_Move_1B5 < PokeBattle_Move
def pbEffect(attacker,opponent,hitnum=0,alltargets=nil,showanimation=true)
if attacker.effects[PBEffects::HealBlock]>0
bob="heal"
bob=_INTL("use {1}",name) if !opponent.pbCanReduceStatStage?(PBStats::ATTACK,true,false,attacker)
@battle.pbDisplay(_INTL("{1} can't {2} because of Heal Block!",attacker.pbThis,bob))
return -1 if !opponent.pbCanReduceStatStage?(PBStats::ATTACK,true,false,attacker)
elsif attacker.hp==attacker.totalhp
@battle.pbDisplay(_INTL("{1}'s HP is full!",attacker.pbThis))
return -1 if !opponent.pbCanReduceStatStage?(PBStats::ATTACK,true,false,attacker)
else
oatk=opponent.attack
attacker.pbRecoverHP(oatk,true)
@battle.pbDisplay(_INTL("{1}'s HP was restored.",attacker.pbThis))
end
if opponent.pbCanReduceStatStage?(PBStats::ATTACK,true,false,attacker)
opponent.pbReduceStat(PBStats::ATTACK,1,true,true,false,attacker)
end
return 0
end
end
Gear Up
Code:
################################################################################
# Gear Up
################################################################################
class PokeBattle_Move_1B6 < PokeBattle_Move
def pbEffect(attacker,opponent,hitnum=0,alltargets=nil,showanimation=true)
if attacker.pbPartner
if attacker.pbPartner.hasWorkingAbility(:PLUS) ||
attacker.pbPartner.hasWorkingAbility(:MINUS)
anim=true
if attacker.pbPartner.pbCanIncreaseStatStage?(PBStats::ATTACK,true)
attacker.pbPartner.pbIncreaseStat(PBStats::ATTACK,1,true,anim)
anim=false
end
if attacker.pbPartner.pbCanIncreaseStatStage?(PBStats::SPATK,true)
attacker.pbPartner.pbIncreaseStat(PBStats::SPATK,1,true,anim)
end
end
end
return 0
end
end
Speed Swap
Code:
################################################################################
# User and target swap their Speed stats
################################################################################
class PokeBattle_Move_1B7 < PokeBattle_Move
def pbEffect(attacker,opponent,hitnum=0,alltargets=nil,showanimation=true)
pbShowAnimation(@id,attacker,opponent,hitnum,alltargets,showanimation)
attacker.speed,opponent.speed=opponent.speed,attacker.speed
@battle.pbDisplay(_INTL("{1} switched their Speed stats!",attacker.pbThis))
return 0
end
end
Shore Up
Code:
################################################################################
# Heals user by 1/2 of its max HP.
# In a sandstorm, heals user by 3/4 of its max HP.
################################################################################
class PokeBattle_Move_1A3 < PokeBattle_Move
def pbEffect(attacker,opponent,hitnum=0,alltargets=nil,showanimation=true)
if attacker.effects[PBEffects::HealBlock]>0
@battle.pbDisplay(_INTL("{1} can't use {2} because of Heal Block!",attacker.pbThis,name))
return -1
end
if attacker.hp==attacker.totalhp
@battle.pbDisplay(_INTL("{1}'s HP is full!",attacker.pbThis))
return -1
end
pbShowAnimation(@id,attacker,nil,hitnum,alltargets,showanimation)
inc=0.5
inc=0.75 if @battle.pbWeather==PBWeather::SANDSTORM
attacker.pbRecoverHP(((attacker.totalhp+1)*inc).floor,true)
@battle.pbDisplay(_INTL("{1}'s HP was restored.",attacker.pbThis))
return 0
end
end
Spotlight
Code:
################################################################################
# This round, target becomes the target of attacks that have single targets.
################################################################################
class PokeBattle_Move_1A6 < PokeBattle_Move
def pbEffect(attacker,opponent,hitnum=0,alltargets=nil,showanimation=true)
if [email protected]
@battle.pbDisplay(_INTL("But it failed!"))
return -1
end
pbShowAnimation(@id,attacker,nil,hitnum,alltargets,showanimation)
opponent.effects[PBEffects::FollowMe]=true
if !opponent.pbPartner.isFainted?
opponent.pbPartner.effects[PBEffects::FollowMe]=false
end
@battle.pbDisplay(_INTL("{1} shone a spotlight on {2}!",attacker.pbThis,opponent.pbThis))
return 0
end
end
Revelation Dance
Code:
################################################################################
# Move type changes based on user's primary type
################################################################################
class PokeBattle_Move_192 < PokeBattle_Move
def pbType(type,attacker,opponent)
return attacker.type1
end
end
Instruct
Code:
################################################################################
# Instructs the target to use the move it last used again.
################################################################################
class PokeBattle_Move_194 < PokeBattle_Move
def pbEffect(attacker,opponent,hitnum=0,alltargets=nil,showanimation=true)
if opponent.lastMoveUsed<=0 ||
(PBMoveData.new(opponent.lastMoveUsed).flags&0x10)==0 # flag e: Copyable by Mirror Move
@battle.pbDisplay(_INTL("The instruction failed!"))
return -1
end
opponent.pbUseMoveSimple(opponent.lastMoveUsed,-1,opponent.index)
return 0
end
end
Last edited: