- 1
- Posts
- 1
- Years
- Seen Mar 4, 2025
For the final touches of my game I would like to incorporate three custom moves. But unfortunately I can't get any further and I hope someone here can help me.
1. The user's attack and special attack increase, and his defense and special defense decrease by one stage each. In addition, the user gains a quarter of the HP it inflicts as damage.
This is what I got so far (merging PokeBattle_Move_0DD and PokeBattle_Move_042):
class PokeBattle_Move_176 < PokeBattle_Move
def healingMove?; return NEWEST_BATTLE_MECHANICS; end
def pbEffectAgainstTarget(user,target)
return if target.damageState.hpLost<=0
hpGain = (target.damageState.hpLost/2.0).round
user.pbRecoverHPFromDrain(hpGain,target)
end
def initialize(battle,move)
super
@statUp = [PBStats::ATTACK,1,PBStats::SPATK,1]
@statDown = [PBStats::DEFENSE,1,PBStats::SPDEF,1]
end
end
2. The entire opposing party (!) is poisoned. With the mechanics of toxic. I've got no idea how to integrate the whole opposing party in the move.
3. The entire own party (!) is revived. Each fainted team member regains 20 percent of its HP. Bonus: The revived Pokémon gain the Ghost-type until the end of the battle. Like number 2, I can't figure out how to affect the whole party.
(I'm still using 18.1.; I know, I know...)
Thank you in advance for your help!
1. The user's attack and special attack increase, and his defense and special defense decrease by one stage each. In addition, the user gains a quarter of the HP it inflicts as damage.
This is what I got so far (merging PokeBattle_Move_0DD and PokeBattle_Move_042):
class PokeBattle_Move_176 < PokeBattle_Move
def healingMove?; return NEWEST_BATTLE_MECHANICS; end
def pbEffectAgainstTarget(user,target)
return if target.damageState.hpLost<=0
hpGain = (target.damageState.hpLost/2.0).round
user.pbRecoverHPFromDrain(hpGain,target)
end
def initialize(battle,move)
super
@statUp = [PBStats::ATTACK,1,PBStats::SPATK,1]
@statDown = [PBStats::DEFENSE,1,PBStats::SPDEF,1]
end
end
2. The entire opposing party (!) is poisoned. With the mechanics of toxic. I've got no idea how to integrate the whole opposing party in the move.
3. The entire own party (!) is revived. Each fainted team member regains 20 percent of its HP. Bonus: The revived Pokémon gain the Ghost-type until the end of the battle. Like number 2, I can't figure out how to affect the whole party.
(I'm still using 18.1.; I know, I know...)
Thank you in advance for your help!