mybusiness
Guest
- 0
- Posts
Disguise
In PokeBattle_Battler:
In PokeBattle_Move:
In PokeBattle_MoveEffects
In Pokemon_Forms
For Greninja, look at this.
Spoiler:
In PokeBattle_Battler:
Spoiler:
Where is Trace:
Where is Power of Alchemy, Receiver (if you don´t have this, skip)
Where is Mummy
Where is elsif target.hasWorkingItem(:WEAKNESSPOLICY) &&
Under Illusion
Code:
# Trace
if self.hasWorkingAbility(:TRACE)
choices=[]
for i in 0...4
[email protected][i]
if pbIsOpposing?(i) && !foe.fainted?
abil=foe.ability
if abil>0 &&
!isConst?(abil,PBAbilities,:TRACE) &&
!isConst?(abil,PBAbilities,:MULTITYPE) &&
!isConst?(abil,PBAbilities,:ILLUSION) &&
!isConst?(abil,PBAbilities,:FLOWERGIFT) &&
!isConst?(abil,PBAbilities,:IMPOSTER) &&
!isConst?(abil,PBAbilities,:STANCECHANGE) &&
!isConst?(abil,PBAbilities,:COMATOSE) &&
!isConst?(abil,PBAbilities,:BATTLEBOND) &&
!isConst?(abil,PBAbilities,:POWERCONSTRUCT) [COLOR="Red"]&&
!isConst?(abil,PBAbilities,:DISGUISE)[/COLOR] &&
Code:
# Power of Alchemy, Receiver
if (self.hasWorkingAbility(:POWEROFALCHEMY) ||
self.hasWorkingAbility(:RECEIVER)) &&
@battle.doublebattle && pbPartner.fainted?
usable=false
abil=pbPartner.ability
if abil>0 &&
!isConst?(abil,PBAbilities,:POWEROFALCHEMY) &&
!isConst?(abil,PBAbilities,:RECEIVER) &&
!isConst?(abil,PBAbilities,:TRACE) &&
!isConst?(abil,PBAbilities,:FORECAST) &&
!isConst?(abil,PBAbilities,:FLOWERGIFT) &&
!isConst?(abil,PBAbilities,:MULTITYPE) &&
!isConst?(abil,PBAbilities,:ILLUSION) &&
!isConst?(abil,PBAbilities,:WONDERGUARD) &&
!isConst?(abil,PBAbilities,:ZENMODE) &&
!isConst?(abil,PBAbilities,:IMPOSTER) &&
!isConst?(abil,PBAbilities,:STANCECHANGE) &&
!isConst?(abil,PBAbilities,:POWERCONSTRUCT) &&
!isConst?(abil,PBAbilities,:SCHOOLING) &&
!isConst?(abil,PBAbilities,:COMATOSE) &&
!isConst?(abil,PBAbilities,:SHIELDSDOWN) [COLOR="red"]&&
!isConst?(abil,PBAbilities,:DISGUISE)[/COLOR] &&
!isConst?(abil,PBAbilities,:RKSSYSTEM) &&
Code:
if target.hasWorkingAbility(:MUMMY,true) && !user.fainted?
if !isConst?(user.ability,PBAbilities,:MULTITYPE) &&
!isConst?(user.ability,PBAbilities,:STANCECHANGE) &&
!isConst?(user.ability,PBAbilities,:MUMMY) [COLOR="red"]&&
!isConst?(user.ability,PBAbilities,:DISGUISE)[/COLOR] &&
!isConst?(user.ability,PBAbilities,:COMATOSE) &&
!isConst?(user.ability,PBAbilities,:BATTLEBOND) &&
!isConst?(user.ability,PBAbilities,:RKSSYSTEM) &&
Code:
elsif target.hasWorkingItem(:WEAKNESSPOLICY) && target.damagestate.typemod>8
showanim=true
[COLOR="Red"] if !target.hasWorkingAbility(:DISGUISE) || target.form!=0[/COLOR]
if target.pbIncreaseStatWithCause(PBStats::ATTACK,2,target,PBItems.getName(target.item),showanim)
PBDebug.log("[Item triggered] #{target.pbThis}'s Weakness Policy (Attack)")
showanim=false
end
if target.pbIncreaseStatWithCause(PBStats::SPATK,2,target,PBItems.getName(target.item),showanim)
PBDebug.log("[Item triggered] #{target.pbThis}'s Weakness Policy (Special Attack)")
showanim=false
end
[COLOR="red"]end[/COLOR]
target.pbConsumeItem if !showanim
Code:
# Illusion
if target.effects[PBEffects::Illusion] && target.hasWorkingAbility(:ILLUSION) &&
damage>0 && !target.damagestate.substitute
PBDebug.log("[Ability triggered] #{target.pbThis}'s Illusion ended")
target.effects[PBEffects::Illusion]=nil
@battle.scene.pbChangePokemon(target,target.pokemon)
@battle.pbDisplay(_INTL("{1}'s {2} wore off!",target.pbThis,
PBAbilities.getName(target.ability)))
end
[COLOR="red"]# Disguise
if target.hasWorkingAbility(:DISGUISE) &&
isConst?(target.species,PBSpecies,:MIMIKYU) && target.form==0 &&
thismove.pbIsDamaging? && !target.damagestate.substitute &&
!user.hasMoldBreaker #&& !thismove.doesBypassIgnorableAbilities?
PBDebug.log("[Ability triggered] #{target.pbThis}'s Disguise ended")
@battle.pbDisplay(_INTL("Its disguise served it as a decoy!"))
target.form=1
target.pbUpdate(true)
@battle.scene.pbChangePokemon(target,target.pokemon)
@battle.pbDisplay(_INTL("{1}'s disguise was busted!",target.pbThis))
if target.hasWorkingItem(:AIRBALLOON,true)
PBDebug.log("[Item triggered] #{target.pbThis}'s Air Balloon popped")
@battle.pbDisplay(_INTL("{1}'s Air Balloon popped!",target.pbThis))
target.pbConsumeItem(true,false)
end
end[/COLOR]
In PokeBattle_Move:
Spoiler:
Where is def pbReduceHPDamage:
Code:
def pbReduceHPDamage(damage,attacker,opponent)
endure=false
if opponent.effects[PBEffects::Substitute]>0 && !ignoresSubstitute?(attacker) &&
(!attacker || attacker.index!=opponent.index)
PBDebug.log("[Lingering effect triggered] #{opponent.pbThis}'s Substitute took the damage")
damage=opponent.effects[PBEffects::Substitute] if damage>opponent.effects[PBEffects::Substitute]
opponent.effects[PBEffects::Substitute]-=damage
opponent.damagestate.substitute=true
@battle.scene.pbDamageAnimation(opponent,0)
@battle.pbDisplayPaused(_INTL("The substitute took damage for {1}!",opponent.name))
if opponent.effects[PBEffects::Substitute]<=0
opponent.effects[PBEffects::Substitute]=0
@battle.pbDisplayPaused(_INTL("{1}'s substitute faded!",opponent.name))
PBDebug.log("[End of effect] #{opponent.pbThis}'s Substitute faded")
end
opponent.damagestate.hplost=damage
damage=0
else
opponent.damagestate.substitute=false
[COLOR="red"]if opponent.hasWorkingAbility(:DISGUISE) &&
!attacker.hasMoldBreaker && opponent.form==0 && damage>0 &&
isConst?(opponent.species,PBSpecies,:MIMIKYU) #&& !doesBypassIgnorableAbilities?
damage=0
end[/COLOR]
if damage>=opponent.hp
damage=opponent.hp
if @function==0xE9 # False Swipe
damage=damage-1
elsif opponent.effects[PBEffects::Endure]
damage=damage-1
Spoiler:
Where is Simple Beam
Where is Worry Seed
Where is Role Play
Where is Gastro Acid
Where is Core Enforcer (if you don´t have this, skip)
Code:
if isConst?(opponent.ability,PBAbilities,:MULTITYPE) ||
isConst?(opponent.ability,PBAbilities,:SIMPLE) ||
isConst?(opponent.ability,PBAbilities,:STANCECHANGE) ||
isConst?(opponent.ability,PBAbilities,:TRUANT) [COLOR="red"]||
isConst?(opponent.ability,PBAbilities,:DISGUISE)[/COLOR] ||
isConst?(opponent.ability,PBAbilities,:COMATOSE) ||
Code:
return -1 if pbTypeImmunityByAbility(pbType(@type,attacker,opponent),attacker,opponent)
if isConst?(opponent.ability,PBAbilities,:MULTITYPE) ||
isConst?(opponent.ability,PBAbilities,:INSOMNIA) ||
isConst?(opponent.ability,PBAbilities,:STANCECHANGE) ||
isConst?(opponent.ability,PBAbilities,:TRUANT) [COLOR="red"]||
isConst?(opponent.ability,PBAbilities,:DISGUISE)[/COLOR] ||
isConst?(opponent.ability,PBAbilities,:COMATOSE) ||
Code:
if opponent.ability==0 ||
attacker.ability==opponent.ability ||
isConst?(attacker.ability,PBAbilities,:MULTITYPE) ||
isConst?(attacker.ability,PBAbilities,:STANCECHANGE) ||
isConst?(opponent.ability,PBAbilities,:FLOWERGIFT) ||
isConst?(opponent.ability,PBAbilities,:FORECAST) ||
isConst?(opponent.ability,PBAbilities,:ILLUSION) ||
isConst?(opponent.ability,PBAbilities,:IMPOSTER) ||
isConst?(opponent.ability,PBAbilities,:MULTITYPE) ||
isConst?(opponent.ability,PBAbilities,:STANCECHANGE) ||
isConst?(opponent.ability,PBAbilities,:TRACE) ||
isConst?(opponent.ability,PBAbilities,:WONDERGUARD) ||
isConst?(opponent.ability,PBAbilities,:ZENMODE) [COLOR="red"]||
isConst?(opponent.ability,PBAbilities,:DISGUISE)[/COLOR] ||
isConst?(opponent.ability,PBAbilities,:COMATOSE) ||
Code:
if isConst?(opponent.ability,PBAbilities,:MULTITYPE) ||
isConst?(opponent.ability,PBAbilities,:STANCECHANGE) [COLOR="red"]||
isConst?(opponent.ability,PBAbilities,:DISGUISE)[/COLOR] ||
isConst?(opponent.ability,PBAbilities,:COMATOSE) ||
Code:
return if opponent.damagestate.substitute
if opponent.hasMovedThisRound? || @battle.choices[opponent.index][0]==3
if isConst?(opponent.ability,PBAbilities,:MULTITYPE) ||
isConst?(opponent.ability,PBAbilities,:STANCECHANGE) [COLOR="red"]||
isConst?(opponent.ability,PBAbilities,:DISGUISE)[/COLOR] ||
isConst?(opponent.ability,PBAbilities,:COMATOSE) ||
Spoiler:
Where is def initialize(*args)
Code:
def initialize(*args)
__mf_initialize(*args)
f=MultipleForms.call("getFormOnCreation",self)
if f
self.form=f
self.resetMoves
end
end
[COLOR="red"]def revertOtherForms
if isConst?(self.species,PBSpecies,:GRENINJA) ||
isConst?(self.species,PBSpecies,:MIMIKYU)
self.form=0
end[/COLOR]
if isConst?(self.species,PBSpecies,:ZYGARDE)
if $zygardeform>=0
self.form=$zygardeform
$zygardeform=-1
elsif self.form==2 # If encountered and caught a Full Forme
self.form=rand(2)
end
end
if isConst?(self.species,PBSpecies,:BURMY) && $burmyform
env=pbGetEnvironment()
if !pbGetMetadata($game_map.map_id,MetadataOutdoor)
self.form=2 # Trash Cloak
elsif env==PBEnvironment::Sand ||
env==PBEnvironment::Rock ||
env==PBEnvironment::Cave
self.form=1 # Sandy Cloak
else
self.form=0 # Plant Cloak
end
$burmyform=false
end
[COLOR="red"]end[/COLOR]
end
For Greninja, look at this.
Last edited: