Advertiser Content
Male
Seen 10 Hours Ago
Posted 1 Week Ago
23 posts
5.2 Years
I don't know about the first ability, but the second one should be something like this:
Search for this
PokeBattle_Move_0E0
go to the one in PokeBattle_MoveEffects then after this block:
    if !attacker.hasMoldBreaker
      bearer=@battle.pbCheckGlobalAbility(:DAMP)
      if bearer!=nil
        @battle.pbDisplay(_INTL("{1}'s {2} prevents {3} from using {4}!",
           bearer.pbThis,PBAbilities.getName(bearer.ability),attacker.pbThis(true),@name))
        return false
      end
    end
    return true
  end
Add this:
  def pbBaseDamage(basedmg,attacker,opponent)
    if attacker.hasWorkingAbility(:YOURABILITYNAME)
      return basedmg*2
    end
      return basedmg
  end
I haven't tested it but it should be something like that.
Male
Ohio
Seen 19 Hours Ago
Posted 1 Week Ago
21 posts
79 Days
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.

################################################################################
# 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":
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.
Developing Pokémon XD: Rebirth, a spiritual successor to Pokémon XD and Colosseum
Advertiser Content