smogon / pokemon-showdown

Pokémon battle simulator.
https://pokemonshowdown.com
MIT License
4.79k stars 2.8k forks source link

Normalize Thousand Arrows is hitting Ghost-types #1272

Closed DanUgore closed 10 years ago

DanUgore commented 10 years ago

Waiting until I find someone who can test Electrify Thousand Arrows in-game but we may need to change it to modify effectiveness vs Flying-type Pokemon to be x1.

ascriptmaster commented 10 years ago

Could we potentially have it lose immunity in the onTryHit handler or the like with an increased onTryHitPriority? The only other move/ability with onTryHitPriority: 1 is Magic Bounce, which doesn't interact with this move at all.

DanUgore commented 10 years ago

Or we could just modify the effectiveness if it's immune

-- V4

On Oct 20, 2014, at 6:33 PM, ascriptmaster notifications@github.com wrote:

Could we potentially have it lose immunity in the onTryHit handler or the like with an increased onTryHitPriority? The only other move/ability with onTryHitPriority: 1 is Magic Bounce, which doesn't interact with this move at all.

\ Reply to this email directly or view it on GitHub.

Zarel commented 10 years ago

This is because we set Thousand Arrows to ignoreImmunity: true, isn't it?

Someone (Marty?) wrote the correct mechanic into PSdex, which should not use ignoreImmunity at all.

http://pokemonshowdown.com/dex/moves/thousandarrows

ascriptmaster commented 10 years ago

Is it possible to override getImmunity the way Freeze Dry and Flying Press override getEffectiveness?

Zarel commented 10 years ago

You could, or you could just implement it properly as described?

Zarel commented 10 years ago

(It's just a volatile, like Roost.)

ascriptmaster commented 10 years ago

Do volatiles take effect before the move calculates onTryHit? My understanding was that Roost losing the Flying type occurred after you healed.

Zarel commented 10 years ago

Volatiles take effect whenever you add them. Obviously you won't be able to add it with volatileStatus: but you can do for instance an addVolatile in onTryHit or whatever event happens right before immunity calculation.

ascriptmaster commented 10 years ago

When do volatiles wear out, though? I don't want Thousand Arrows missing due to evasion moves but then letting the target Pokemon get hit by Ground moves for the rest of the turn, either.

Zarel commented 10 years ago

Volatiles wear out when you call endVolatile, after a number of turns specified by duration:, or upon switch-out, whichever comes first.

Zarel commented 10 years ago

One-turn volatiles like Roost are implemented by duration: 1.

ascriptmaster commented 10 years ago

This can probably be closed now.

Zarel commented 10 years ago

I think the mechanic is still wrong?

Either way, it's not implemented the way it's described in PSdex. Again:

Deals damage to one adjacent target. This move can hit a target using Bounce, Fly, or Sky Drop. If this move hits a target under the effect of Bounce, Fly, Magnet Rise, or Telekinesis, the effect ends. If the target is a Flying-type that has not used Roost this turn or a Pokemon with the Ability Levitate, it loses its immunity to Ground-type attacks and the Ability Arena Trap as long as it remains active. During the effect, Magnet Rise fails for the target and Telekinesis fails against the target.

Marty-D commented 10 years ago

Nah, I didn't write that. I guess technically I did, but I can tell it was copy-pasted from Smack Down since it still says "one adjacent target" instead of "all adjacent foes". The actual description is:

This move can hit airborne Pokemon, which includes Flying-type Pokemon, Pokemon with the Ability Levitate, Pokemon holding an Air Balloon, and Pokemon under the effect of Magnet Rise or Telekinesis. This move can hit a target using Bounce, Fly, or Sky Drop. If this move hits a target under the effect of Bounce, Fly, Magnet Rise, or Telekinesis, the effect ends. If the target is a Flying type that has not used Roost this turn or a Pokemon with the Ability Levitate, it loses its immunity to Ground-type attacks and the Ability Arena Trap as long as it remains active. During the effect, Magnet Rise fails for the target and Telekinesis fails against the target.

ascriptmaster commented 10 years ago

Aha. So Thousand Arrows' target should be allAdjacentFoes instead, and I need to let it hit Fly/Bounce/Sky Drop Pokemon.

Zarel commented 10 years ago

Also it makes target lose immunity to Ground until switch-out, if target was immune to Ground.

ascriptmaster commented 10 years ago

That's what volatileStatus: smackdown is for, right?

Zarel commented 10 years ago

Oh, we do that already? Never mind, then, it's all good.

ascriptmaster commented 10 years ago

Is this done now? #1279 should have fixed most of the things that were missing in its behavior.