Ego13
hollow_ego
- 311
- Posts
- 7
- Years
- Larua Region
- Seen Mar 24, 2023
If you could post either/both of those I'd appreciate it. I only started looking into pokemon essentials a few days ago and dancer especially is eluding me.
for Comatose it really is just placing the ability check in the right places in the right way.
Here are the places where it needs to be added
Spoiler:
- to Trace PokeBattle_Battler around line 1137
- to Dream Eater PokeBattle_Battler around line 2680 -> && !target.hasWorkingAbility(:COMATOSE)
- to def pbCanSleep? PokeBattle_BattlerEffects around line 5 -> if !ignorestatus && (status==PBStatuses::SLEEP || hasWorkingAbility(:COMATOSE))
- to def pbCanSleepYawn PokeBattle_BattlerEffects around line 64 after Insomnia
- to all other status Effects (canPoison? etc.) -> keep in mind the checks for Poison Spikes and checks like def pbCanPoisonSynchronize?(opponent)
- to ability copying moves class PokeBattle_Move_065< PokeBattle_Move,class PokeBattle_Move_066 < PokeBattle_Move,class PokeBattle_Move_067 < PokeBattle_Move
- to Wake up slap class PokeBattle_Move_07D < PokeBattle_Move
- to Hex class PokeBattle_Move_07F < PokeBattle_Move
- to Sleep Talk class PokeBattle_Move_0B4 < PokeBattle_Move
- to Rest class PokeBattle_Move_0D9 < PokeBattle_Move
- to Nightmare Move Effect class PokeBattle_Move_10F < PokeBattle_Move
- to Snore class PokeBattle_Move_011 < PokeBattle_Move
- to Nightmare in PokeBattle_Battle around line 3358
For Dancer follow these instructions. It is tested for single and double battles and should work just like in the game. Give credit when using this (as it was a real pain to get this stuff working and took me several hours)
Spoiler:
[* ]Add Effect "Dancer" to PBEffects atCode:# These effects apply to a battler
- In PokeBattle_Battler in
Code:
def pbInitEffects(batonpass)
Code:@effects[PBEffects::Dancer] = false
- In PokeBattle_Battler
Code:
def pbUseMoveSimple(moveid,index=-1,target=-1)
Code:def pbUseMoveSimple(moveid,index=-1,target=-1) choice=[] choice[0]=1 # "Use move" choice[1]=index # Index of move to be used in user's moveset choice[2]=PokeBattle_Move.pbFromPBMove(@battle,PBMove.new(moveid)) # PokeBattle_Move object of the move choice[2].pp=-1 choice[3]=target # Target (-1 means no target yet) if index>=0 @battle.choices[@index][1]=index end PBDebug.log("#{pbThis} used simple move #{choice[2].name}") pbUseMove(choice,true) if $dancercount!=1 pbUseMove(choice,false) if $dancercount==1 return end
- In PokeBattle_Battler find
Code:
# Record that user has used a move this round (ot at least tried to)
Code:if self.effects[PBEffects::Dancer] && $dancercount==1 $dancercount=0 else [email protected] end
- In PokeBattle_Battler find
Code:
# End of move usage
under that line and beforeCode:pbEndTurn(choice)
Code:abilityOnMoveEnd(user) if user.effects[PBEffects::Dancer]!=true
- make a new script section above main and name it Ability Helper Scripts
add the following script
Code:def abilityOnMoveEnd(user) dancermoves=[170,138,63,483,192,17,418,420] #dancemoves={FEATHERDANCE,FIERYDANCE,DRAGONDANCE,LUNARDANCE,PETALDANCE,QUIVERDANCE,SWORDSDANCE,TEETERDANCE} dancers=[] user.effects[PBEffects::Dancer]=true if dancermoves.include?(@battle.lastMoveUsed) for i in @battle.pbPriority dancers.push(i) if i.hasWorkingAbility(:DANCER) && i.effects[PBEffects::Dancer]!=true end for i in dancers #@battle.pbPriority if dancermoves.include?(@battle.lastMoveUsed) && !i.isFainted? && i.effects[PBEffects::Outrage]==0 #tempOutrage=i.effects[PBEffects::Outrage] tempChoice=i.effects[PBEffects::ChoiceBand] #@battle.pbDisplay(_INTL("{1}'s Dancer!",i.pbThis)) @battle.scene.showAbilityMessage(i,true) $dancercount=1 i.effects[PBEffects::Dancer]=true i.pbUseMoveSimple(@battle.lastMoveUsed) i.effects[PBEffects::Outrage]=0 #i.effects[PBEffects::Outrage]=tempOutrage i.effects[PBEffects::ChoiceBand]=tempChoice elsif dancermoves.include?(@battle.lastMoveUsed) && !i.isFainted? && i.effects[PBEffects::Outrage]!=0 #@battle.pbDisplay(_INTL("{1}'s Dancer!",i.pbThis)) @battle.scene.showAbilityMessage(i,true) @battle.pbDisplay(_INTL("But it failed!")) end for i in dancers i.effects[PBEffects::Dancer]=false end user.effects[PBEffects::Dancer]=false end end
Last edited: