Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #############################################
- # Dust Heal by Juliorain #
- #############################################
- #in PBEffects, under the sectiona about affecting the user add at the end whatever unused number denoted with a #
- DustHeal = #
- #copy this under @effects[PBEffects::Ingrain] = false in PokeBattle_BattlerEffects
- @effects[PBEffects::DustHeal] = false
- #copy this in MoveEffects
- ################################################################################
- # DustHeal Ingrains the user. Ingrained Pokémon gain 1/16 of max HP at the end of each
- # round, 1/8 of max HP in SANDSTORM and cannot flee or switch out.
- ################################################################################
- class PokeBattle_Move_CF9 < 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.effects[PBEffects::DustHeal]
- @battle.pbDisplay(_INTL("But it failed!"))
- return -1
- end
- pbShowAnimation(@id,attacker,nil,hitnum,alltargets,showanimation)
- attacker.effects[PBEffects::Ingrain]=true
- @battle.pbDisplay(_INTL("{1} planted its roots!",attacker.pbThis))
- return 0
- end
- end
- #copy this under ingrain at the start of PBPokemon_Battle:
- if thispkmn.effects[PBEffects::DustHeal]
- pbDisplayPaused(_INTL("{1} can't be switched out!",thispkmn.pbThis)) if showMessages
- return false
- end
- #copy this under ingrain at the end of PBPokemon_Battle:
- # DustHeal
- for i in priority
- next if i.isFainted?
- if i.effects[PBEffects::DustHeal]
- PBDebug.log("[#{i.pbThis}'s Ingrain triggered]")
- hpgain=(i.totalhp/16).floor
- hpgain=(hpgain*1.3).floor if i.hasWorkingItem(:BIGROOT)
- hpgain=(hpgain*1.3).floor if i.hasWorkingAbility(:DRAINBOOST)
- hpgain=i.pbRecoverHP(hpgain,true)
- pbDisplay(_INTL("{1} absorbed nutrients from the dust in the air!",i.pbThis)) if hpgain>0
- end
- if i.effects[PBEffects::DustHeal] && pbWeather==PBWeather::SANDSTORM
- PBDebug.log("[#{i.pbThis}'s Dust Heal triggered)
- hpgain=(i.totalhp/8).floor
- hpgain=(hpgain*1.3).floor if i.hasWorkingItem(:BIGROOT)
- hpgain=(hpgain*1.3).floor if i.hasWorkingAbility(:DRAINBOOST)
- hpgain=i/pbRecoverHP(hpgain,true)
- pbDisplay(_INTL("{1} absorbed nutrients from the dust in the air!",i.pbThis)) if hpgain>0
- end
- end
- #for your moves.txt doc:
- ___,DUSTHEAL,DustHeal,CF9,0,GROUND,Status,0,20,0,10,0,dim,"The user digs itself in the ground to absorb nutirents in the air to restor HP at the end of every turn. Because it is rooted, it can't switch out."
- ##################################################
- # Drain Boost Ability #
- ##################################################
- #inaddition to keeping the above, add this to your abilities.txt using whatever unused ID number you want, denoted with a "___"
- ___,DRAINBOOST,Drain Boost,"Boosts the power of Draining and Leech moves barring Strength Sap."
- #in PokeBattle_Move right below Iron Fist, copy:
- if attacker.hasWorkingAbility(:DRAINBOOST)
- if [569,210,207,201,200,99,13,595].include?(@id)
- damagemult=(damagemult*1.3).floor
- end
- end
- #in PokeBattle_Battle literally replace the EoT Leech Seed effect with
- # Leech Seed
- for i in priority
- next if i.isFainted?
- if i.effects[PBEffects::LeechSeed]>=0
- recipient=@battlers[i.effects[PBEffects::LeechSeed]]
- if recipient && !recipient.isFainted? # if recipient exists
- PBDebug.log("[#{i.pbThis}'s Leech Seed triggered]")
- pbCommonAnimation("LeechSeed",recipient,i)
- hploss=i.pbReduceHP((i.totalhp/8).floor,true)
- if i.hasWorkingAbility(:LIQUIDOOZE)
- recipient.pbReduceHP(hploss,true)
- pbDisplay(_INTL("{1} sucked up the liquid ooze!",recipient.pbThis))
- elsif recipient.effects[PBEffects::HealBlock]==0
- hploss=(hploss*1.3).floor if recipient.hasWorkingItem(:BIGROOT)
- hploss=(hploss*1.3).floor if recipient.hasWorkingAbility(:DRAINBOOST)
- recipient.pbRecoverHP(hploss,true)
- pbDisplay(_INTL("{1}'s health was sapped by Leech Seed!",i.pbThis))
- end
- if i.isFainted?
- return if !i.pbFaint
- end
- if recipient.isFainted?
- return if !recipient.pbFaint
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment