- 6
- Posts
- 3
- Years
- Seen Apr 24, 2023
Hello everyone.
This is my first time ever posting on a forum.
I just started my own Pokémon fangame and overall the experience's been nice.
I was creating an ability for my Mega Typhlosion that boosts your fire type attacks but burns yourself upon mega-evolving
This is the code I've written:
BattleHandlers::AbilityOnSwitchIn.add(:FINALFLARE,
proc { |ability, battler, battle|
battle.pbShowAbilitySplash(battler)
battler.pbBurn(nil,_INTL("Typhlosion was burned by it's own power!"))
battle.pbHideAbilitySplash(battler)
}
)
BattleHandlers::DamageCalcUserAbility.add(:FINALFLARE,
proc { |ability,user,target,move,mults,baseDmg,type,battler,battle|
mults[:base_damage_multiplier] *= 1.5 if type == :FIRE
}
)
The obvious problem ? Mega Typhlosion burns itself every turn he comes in. I don't know how to make it so if you are already burned (or any other status effect) the ability doesn't proc (the status part, the damage boost stays always).
Has anyone an idea ?
Thanks for reading me.
This is my first time ever posting on a forum.
I just started my own Pokémon fangame and overall the experience's been nice.
I was creating an ability for my Mega Typhlosion that boosts your fire type attacks but burns yourself upon mega-evolving
This is the code I've written:
BattleHandlers::AbilityOnSwitchIn.add(:FINALFLARE,
proc { |ability, battler, battle|
battle.pbShowAbilitySplash(battler)
battler.pbBurn(nil,_INTL("Typhlosion was burned by it's own power!"))
battle.pbHideAbilitySplash(battler)
}
)
BattleHandlers::DamageCalcUserAbility.add(:FINALFLARE,
proc { |ability,user,target,move,mults,baseDmg,type,battler,battle|
mults[:base_damage_multiplier] *= 1.5 if type == :FIRE
}
)
The obvious problem ? Mega Typhlosion burns itself every turn he comes in. I don't know how to make it so if you are already burned (or any other status effect) the ability doesn't proc (the status part, the damage boost stays always).
Has anyone an idea ?
Thanks for reading me.