- 1,479
- Posts
- 10
- Years
- Seen today
I'm trying to add several new and old abilities to my game, and I'm running into issues with several of them. I'm no expert at this by any means, so I'm basically just tinkering until I find something that works. I'm not getting any errors with anything, but many of them just flat out dont seem to be working. If anyone more experienced at this would look these over and point out any glaring flaws, I'd appreciate it.
Gen V Abilities
Overcoat (with Gen VI changes)
Location: PokeBattle_Move
Goal: All "powder"-based moves should be blocked when the user has Overcoat, Safety Goggles, or is a Grass-type.
Note: I added the unused flag "n" to all the "powder" moves in the PBS moves file.
Issue: Nothing seems to change when this is active, the moves just hit as they normally would.
Sheer Force
Location: PokeBattle_Move
Goal: This should negate secondary effects of moves, but boost their damage by 30%.
Note: I wont bother posting the entire code, because i list the functions for every move with secondary effects. You get the gist of it here, though.
Note: I already went through the whole script and added lines to negate the secondary effects of all the appropriate moves if Sheer Force is active. I won't list those changes because there's a lot, and that isn't the part I'm having issues with.
Issue: When this ability is active, the negation of secondary effects works perfectly fine from what I can tell. The problem is that there doesn't seem to be any boost to damage for any of those moves.
Gen VI Abilities
Tough Claws
Location: PokeBattle_Move
Goal: This should boost the damage of all contact moves by 33%.
Issue: I don't seem to see any damage difference when this ability is active.
Strong Jaw
Location: PokeBattle_Move
Goal: All "biting" attacks should have their damage boosted by 50%.
Note: I added the unused flag "m" to all the biting moves in the PBS moves file.
Issue: Same as Tough Claws - I don't see any damage difference when this is active.
Bulletproof
Location: PokeBattle_Move
Goal: Damage from certain ball & bomb attacks should be completely negated.
Note: I added the unused flag "o" to all the ball & bomb attacks that Bulletproof is meant to block in the PBS moves file.
Issue: Damage from ball & bomb moves aren't negated at all, and just hit as they normally would.
Custom Abilities
Energy Drain
Location: PokeBattle_Move
Goal: I want this to boost the damage of all Absorb-like moves by 50%.
Issue: Again, no damage difference is noticeable when this is active.
Sharp Edge
Location:PokeBattle_Move
Goal: I want this to boost the damage and crit chance of sword & slashing moves by 30%.
Note: I added the unused flag "p" to all the sword & slashing attacks in the PBS moves file.
Issue: No detectable difference in damage.
^This is under Super Luck under the def pbisCritical?
Fang Leech
Location: PokeBattle_Move
Goal: I want this to make all "biting" moves have an additional HP-stealing effect, like Absorb.
Note: This uses the same flag for biting moves as Strong Jaw does.
Issue: Nothing happens when this is active. The moves just deal damage as they normally would, and nothing else.
Gen V Abilities
Overcoat (with Gen VI changes)
Location: PokeBattle_Move
Goal: All "powder"-based moves should be blocked when the user has Overcoat, Safety Goggles, or is a Grass-type.
Note: I added the unused flag "n" to all the "powder" moves in the PBS moves file.
Issue: Nothing seems to change when this is active, the moves just hit as they normally would.
Code:
if (isConst?(opponent.ability,PBAbilities,:OVERCOAT) ||
opponent.pbHasType?(:GRASS) ||
isConst?(opponent.item,PBItems,:SAFETYGOGGLES)) &&
(@flags&0x2000)!=0 #flag n: Powder move
@battle.pbDisplay(_INTL("It doesn't affect {1}...",pbThis(true))) if showMessages
return 0
end
Sheer Force
Location: PokeBattle_Move
Goal: This should negate secondary effects of moves, but boost their damage by 30%.
Note: I wont bother posting the entire code, because i list the functions for every move with secondary effects. You get the gist of it here, though.
Note: I already went through the whole script and added lines to negate the secondary effects of all the appropriate moves if Sheer Force is active. I won't list those changes because there's a lot, and that isn't the part I'm having issues with.
Issue: When this ability is active, the negation of secondary effects works perfectly fine from what I can tell. The problem is that there doesn't seem to be any boost to damage for any of those moves.
Code:
if isConst?(attacker.ability,PBAbilities,:SHEERFORCE)
if @function==0x05 || # Cross Poison, etc.
@function==0x06 || # Poison Fang, etc.
@function==0x07 || # Body Slam, etc.
@function==0x08 || # Thunder
@function==0x09 || # Thunder Fang
etc,
etc,
etc...
basedmg=(basedmg*1.3).floor
end
end
Gen VI Abilities
Tough Claws
Location: PokeBattle_Move
Goal: This should boost the damage of all contact moves by 33%.
Issue: I don't seem to see any damage difference when this ability is active.
Code:
if isConst?(attacker.ability,PBAbilities,:TOUGHCLAWS) &&
(@flags&0x01)!=0 && damage>0 # flag A: Makes contact
basedmg=(basedmg*1.33).floor
end
Strong Jaw
Location: PokeBattle_Move
Goal: All "biting" attacks should have their damage boosted by 50%.
Note: I added the unused flag "m" to all the biting moves in the PBS moves file.
Issue: Same as Tough Claws - I don't see any damage difference when this is active.
Code:
if isConst?(attacker.ability,PBAbilities,:STRONGJAW) &&
(@flags&0x1000)!=0 # flag m: Biting move
basedmg=(basedmg*1.5).floor
end
Bulletproof
Location: PokeBattle_Move
Goal: Damage from certain ball & bomb attacks should be completely negated.
Note: I added the unused flag "o" to all the ball & bomb attacks that Bulletproof is meant to block in the PBS moves file.
Issue: Damage from ball & bomb moves aren't negated at all, and just hit as they normally would.
Code:
if isConst?(opponent.ability,PBAbilities,:BULLETPROOF) &&
(@flags&0x4000)!=0 #flag o: Bomb/ball move
basedamage==0
abilityname=PBAbilities.getName(opponent.ability)
@battle.pbDisplay(_INTL("{1} is protected with with {2}!",
opponent.pbThis,PBAbilities.getName(opponent.ability), self.name))
return 0
end
Custom Abilities
Energy Drain
Location: PokeBattle_Move
Goal: I want this to boost the damage of all Absorb-like moves by 50%.
Issue: Again, no damage difference is noticeable when this is active.
Code:
if isConst?(attacker.ability,PBAbilities,:ENERGYDRAIN) &&
@function==0xDD #Absorb, etc.
basedmg=(basedmg*1.5).floor
end
Sharp Edge
Location:PokeBattle_Move
Goal: I want this to boost the damage and crit chance of sword & slashing moves by 30%.
Note: I added the unused flag "p" to all the sword & slashing attacks in the PBS moves file.
Issue: No detectable difference in damage.
Code:
c+=1 if isConst?(attacker.ability,PBAbilities,:SHARPEDGE) && (@flags&0x8000)!=0
Code:
if isConst?(attacker.ability,PBAbilities,:SHARPEDGE) &&
(@flags&0x8000)!=0 #flag p: Sword/Slash move
basedmg=(basedmg*1.3).floor
end
Fang Leech
Location: PokeBattle_Move
Goal: I want this to make all "biting" moves have an additional HP-stealing effect, like Absorb.
Note: This uses the same flag for biting moves as Strong Jaw does.
Issue: Nothing happens when this is active. The moves just deal damage as they normally would, and nothing else.
Code:
if isConst?(attacker.ability,PBAbilities,:FANGLEECH) &&
(@flags&0x01000)!=0 # flag m: Biting move
if opponent.damagestate.calcdamage>0
hpgain=((opponent.damagestate.hplost+1)/2).floor
if isConst?(opponent.ability,PBAbilities,:LIQUIDOOZE)
attacker.pbReduceHP(hpgain,true)
@battle.pbDisplay(_INTL("{1} sucked up the liquid ooze!",attacker.pbThis))
elsif attacker.effects[PBEffects::HealBlock]==0
hpgain=(hpgain*1.3).floor if isConst?(attacker.item,PBItems,:BIGROOT)
attacker.pbRecoverHP(hpgain,true)
@battle.pbDisplay(_INTL("{1}'s {2} drained some HP!",
attacker.pbThis,PBAbilities.getName(attacker.ability))) if hpgain>0
end
end
end