Arkadious
Developer of Fragmentum
- 50
- Posts
- 9
- Years
- Age 27
- New Zealand
- Seen Apr 30, 2021
Hello, I'm rather new to the Pokemon coding scene and a little stuck with making a custom move for a friend. I was wondering if anyone would be able to help me out?
I understand that in the Moves.txt that the custom move needs to be set to 133 or greater like so:
That was the move are trying to make. It's a one-hit KO that can only be used after all other moves have been used at least once and damages all Pokemon around it (including allies) using 1pp with infinite accuracy. We planned on having it in a really hard spot, being taught by a move tutor who'd teach to one Pokemon and one Pokemon only before disppearing.
The problem is that its able to be used currently without using all other moves and only does 1 damage.
This is the code atm:
Thanks.
I understand that in the Moves.txt that the custom move needs to be set to 133 or greater like so:
639,ANNIHILATINGFIRE,Annihilating Fire,163,1,QMARKS,Special,0,1,0,08,2,,This move can be used only after the user has used all the other moves it knows in the battle.
That was the move are trying to make. It's a one-hit KO that can only be used after all other moves have been used at least once and damages all Pokemon around it (including allies) using 1pp with infinite accuracy. We planned on having it in a really hard spot, being taught by a move tutor who'd teach to one Pokemon and one Pokemon only before disppearing.
The problem is that its able to be used currently without using all other moves and only does 1 damage.
This is the code atm:
class PokemonBattle_Move_163 < PokeBattle_Move
def pbMoveFailed(attacker,opponent)
counter=0; nummoves=0
for move in attacker.moves
next if move.id<=0
counter+=1 if move.id!=@id && !attacker.movesUsed.include?(move.id)
nummoves+=1
end
return counter!=0 || nummoves==1
end
def pbAccuracyCheck(attacker,opponent)
return true
if opponent.hasWorkingAbility(:STURDY) && !attacker.hasBypassingAbility
@battle.pbDisplayEffect(opponent)
@battle.pbDisplay(_INTL("{1} was protected by {2}!",opponent.pbThis,PBAbilities.getName(opponent.ability)))
return false
end
if opponent.level>attacker.level
@battle.pbDisplay(_INTL("{1} is unaffected!",opponent.pbThis))
return false
end
acc=@accuracy+attacker.level-opponent.level
return @battle.pbRandom(100)<acc
end
def pbEffect(attacker,opponent,hitnum=0,alltargets=nil,showanimation=true)
damage=pbEffectFixedDamage(opponent.totalhp,attacker,opponent,hitnum,alltargets,showanimation)
if opponent.isFainted?
@battle.pbDisplay(_INTL("It's a one-hit KO!"))
end
return damage
end
end
Thanks.
Last edited: