mybusiness
Guest
- 0
- Posts
Good to look that ' !doesIgnoreAbilities?'. Can you share your def? Cuz i havent yet...
That is relating Necrozma's special moves' effects, which is almost done. When I finish that I'll post in another thread.
Also, could you post SHIELDSDOWN ability? I saw that you script is different to the others.
Dancer is next in my list of requests. This was my hardest challenge, by the way. So, here it is:
Add this in PokeBattle_Move, after def isBombMove?
Spoiler:
Code:
def isDanceMove?
return isConst?(@id,PBMoves,:QUIVERDANCE) ||
isConst?(@id,PBMoves,:DRAGONDANCE) ||
isConst?(@id,PBMoves,:FIERYDANCE) ||
isConst?(@id,PBMoves,:FEATHERDANCE) ||
isConst?(@id,PBMoves,:PETALDANCE) ||
isConst?(@id,PBMoves,:SWORDSDANCE) ||
isConst?(@id,PBMoves,:TEETERDANCE) ||
isConst?(@id,PBMoves,:LUNARDANCE) ||
isConst?(@id,PBMoves,:REVELATIONDANCE)
end
Spoiler:
Code:
Dancer = 110 # you may replace 110 with the next number after the number associated to your last effect
Where is def pbProcessMoveAgainstTarget:
Spoiler:
Code:
def pbProcessMoveAgainstTarget(thismove,user,target,numhits,turneffects,nocheck=false,alltargets=nil,showanimation=true[COLOR="Red"],dancercheck=false[/COLOR])
Spoiler:
Code:
[COLOR="red"]# Dancer using damaging moves
if thismove.isDanceMove? && !dancercheck
if @battle.doublebattle
for k in @battle.pbPriority(true)
if k!=user && !k.fainted?
if !k.effects[PBEffects::Dancer] &&
k.hasWorkingAbility(:DANCER)
@battle.battlers[user.index].effects[PBEffects::Dancer]=true
if k==user.pbPartner
if !target.fainted?
if target==user.pbPartner
if !user.pbOpposing1.fainted?
@battle.pbDisplay(_INTL("{1} also dances!",k.pbThis))
k.effects[PBEffects::Dancer]=true
pbProcessMoveAgainstTarget(thismove,k,user.pbOpposing1,numhits,turneffects,nocheck,alltargets,showanimation,true)
elsif !user.pbOpposing2.fainted?
@battle.pbDisplay(_INTL("{1} also dances!",k.pbThis))
k.effects[PBEffects::Dancer]=true
pbProcessMoveAgainstTarget(thismove,k,user.pbOpposing2,numhits,turneffects,nocheck,alltargets,showanimation,true)
elsif !user.fainted?
@battle.pbDisplay(_INTL("{1} wants to dance, but will not attack its ally!",user.pbPartner.pbThis))
else
@battle.pbDisplay(_INTL("What a pity! {1} wanted to dance...",user.pbPartner.pbThis))
end
else
@battle.pbDisplay(_INTL("{1} also dances!",k.pbThis))
k.effects[PBEffects::Dancer]=true
pbProcessMoveAgainstTarget(thismove,k,target,numhits,turneffects,nocheck,alltargets,showanimation,true)
end
elsif !target.pbPartner.fainted?
@battle.pbDisplay(_INTL("{1} also dances!",k.pbThis))
k.effects[PBEffects::Dancer]=true
pbProcessMoveAgainstTarget(thismove,k,target.pbPartner,numhits,turneffects,nocheck,alltargets,showanimation,true)
elsif !user.fainted?
@battle.pbDisplay(_INTL("{1} wants to dance, but will not attack its ally!",user.pbPartner.pbThis))
else
@battle.pbDisplay(_INTL("What a pity! {1} wanted to dance...",user.pbPartner.pbThis))
end
elsif k==user.pbOpposing1
if !user.fainted?
@battle.pbDisplay(_INTL("{1} also dances!",k.pbThis))
k.effects[PBEffects::Dancer]=true
pbProcessMoveAgainstTarget(thismove,k,user,numhits,turneffects,nocheck,alltargets,showanimation,true)
elsif !user.pbPartner.fainted?
@battle.pbDisplay(_INTL("{1} also dances!",k.pbThis))
k.effects[PBEffects::Dancer]=true
pbProcessMoveAgainstTarget(thismove,k,user.pbPartner,numhits,turneffects,nocheck,alltargets,showanimation,true)
elsif !user.pbOpposing2.fainted?
@battle.pbDisplay(_INTL("{1} wants to dance, but will not attack its ally!",user.pbOpposing1.pbThis))
else
@battle.pbDisplay(_INTL("What a pity! {1} wanted to dance...",user.pbOpposing1.pbThis))
end
elsif k==user.pbOpposing2
if !user.fainted?
@battle.pbDisplay(_INTL("{1} also dances!",k.pbThis))
k.effects[PBEffects::Dancer]=true
pbProcessMoveAgainstTarget(thismove,k,user,numhits,turneffects,nocheck,alltargets,showanimation,true)
elsif !user.pbPartner.fainted?
@battle.pbDisplay(_INTL("{1} also dances!",k.pbThis))
k.effects[PBEffects::Dancer]=true
pbProcessMoveAgainstTarget(thismove,k,user.pbPartner,numhits,turneffects,nocheck,alltargets,showanimation,true)
elsif !user.pbOpposing1.fainted?
@battle.pbDisplay(_INTL("{1} wants to dance, but will not attack its ally!",user.pbOpposing1.pbThis))
else
@battle.pbDisplay(_INTL("What a pity! {1} wanted to dance...",user.pbOpposing2.pbThis))
end
end
end
end
end
elsif target.hasWorkingAbility(:DANCER) && !target.fainted? && !user.fainted?
@battle.pbDisplay(_INTL("{1} also dances!",target.pbThis))
pbProcessMoveAgainstTarget(thismove,target,user,numhits,turneffects,nocheck,alltargets,showanimation,true)
elsif target.hasWorkingAbility(:DANCER) && !target.fainted? && user.fainted?
@battle.pbDisplay(_INTL("What a pity! {1} wanted to dance...",target.pbThis))
end
end [/COLOR]
# Berry check
for j in 0...4
@battle.battlers[j].pbBerryCureCheck
end
target.pbUpdateTargetedMove(thismove,user)
user.effects[PBEffects::LaserFocus]=false
user.effects[PBEffects::LastMoveFailed]=false
end
Spoiler:
Code:
# Try to use move against user if there aren't any targets
if targets.length==0
user=pbChangeUser(thismove,user)
if thismove.target==PBTargets::SingleNonUser ||
thismove.target==PBTargets::RandomOpposing ||
thismove.target==PBTargets::AllOpposing ||
thismove.target==PBTargets::AllNonUsers ||
thismove.target==PBTargets::Partner ||
thismove.target==PBTargets::UserOrPartner ||
thismove.target==PBTargets::SingleOpposing ||
thismove.target==PBTargets::OppositeOpposing
@battle.pbDisplay(_INTL("But there was no target..."))
else
PBDebug.logonerr{
thismove.pbEffect(user,nil)
}
[COLOR="red"]# Dancer using non-damaging move
if thismove.isDanceMove?
for s in @battle.pbPriority(true)
if s!=user &&
s.hasWorkingAbility(:DANCER) &&
!s.fainted?
@battle.pbDisplay(_INTL("{1} also dances!",s.pbThis))
PBDebug.logonerr{
thismove.pbEffect(s,nil)
}
end
end
end[/COLOR]
end
else
Spoiler:
Code:
def pbBeginTurn(choice)
# Cancel some lingering effects which only apply until the user next moves
@effects[PBEffects::DestinyBond]=false
@effects[PBEffects::Grudge]=false
[COLOR="red"]@effects[PBEffects::Dancer]=false[/COLOR]
# Reset Parental Bond's count
@effects[PBEffects::ParentalBond]=0
Spoiler:
Code:
def pbEndTurn(choice)
# True end(?)
if @effects[PBEffects::ChoiceBand]<0 && @lastMoveUsed>=0 && !fainted? &&
(self.hasWorkingItem(:CHOICEBAND) ||
self.hasWorkingItem(:CHOICESPECS) ||
self.hasWorkingItem(:CHOICESCARF))
@effects[PBEffects::ChoiceBand]=@lastMoveUsed
end
@battle.pbPrimordialWeather
for i in 0...4
@battle.battlers[i].pbBerryCureCheck
end
for i in 0...4
@battle.battlers[i].pbAbilityCureCheck
end
for i in 0...4
@battle.battlers[i].pbAbilitiesOnSwitchIn(false)
end
for i in 0...4
@battle.battlers[i].pbCheckForm
[COLOR="red"]@battle.battlers[i].effects[PBEffects::Dancer]=false[/COLOR]
end
end
Known discrepancies with the official standards:
-The priority among multiple moves activated by Dancer are sorted by speed (slowest to fastest), ignoring some effects (e.g.: Trick Room)
-Dancer will still activate if a dance move is snatched
-Moves activated by Dancer ignore Confusion, Encore, Taunt and Choice items and cannot be snatched or reflected by Magic Bounce or Magic Coat
-Petal Dance used through Dancer locks its attacker 2-3 turns (like its normal usage)
*-Oricorios are not stupid, i.e., doesn't attack its allies (this was made intentional by me, to make this ability more practical)
If anyone knows how to fix those above (minus the last), would be ideal, but if not, is no tragedy; as you see, those are not relevant bugs for the average hack.
Last edited: