Hi there! Here are some ideas that hopefully help some. The first ability I have something conceptual, the second one I think I have the fix if you haven't fixed it yet.
An ability that keeps you alive from Explosion sounds neat. I think you would add it into "def pbReduceHPDamage(damage,attacker,opponent)" under PokeBattle_Move. There's already things like False Swipe and Sturdy there, which you'll probably end up copying bits from. You'll definitely be able to take the messages that display after using the moves from there, like for Substitute it says in-battle that your Substitute faded. To make your Pokemon survive the Explsion, I think you could just tell it to set HP to 1! You'll have to play around with it to see if that works.
As for doubling the power of Selfdestruct/Explosion through an ability, you'll want to go to the PokeBattle_MoveEffects script section. There are lots of moves there, each with different things being done to them. I'll use the script for Acrobatics to start you out, since it's fairly similar.
Code:
################################################################################
# Power is doubled if the user has no held item. (Acrobatics)
################################################################################
class PokeBattle_Move_086 < PokeBattle_Move
def pbBaseDamageMultiplier(damagemult,attacker,opponent)
if attacker.item==0
return (damagemult*2.0).round
end
return damagemult
end
end
It starts out with a Move Class, which is also known as a function code. You'll need to find the appropriate codes for Selfdestruct/Explosion
here and replace the current one. Then it has the condition of the attacker holding an item, which returns a 2x damage multiplier if false.
You can do the same thing! Instead of asking if the attacker has an item, ask if it has that certain ability. I think you can use this in place of "if attacker.item==0":
Code:
if attacker.hasWorkingAbility(:KABOOM)
where you replace your ability name instead of KABOOM (unless that's what you named your ability!)
Haven't tested it, but I think it should work.