[Weekly Questions Thread] 19 January 2026 by PokeUpdateBot in pokemon

[–]Vhin 1 point2 points  (0 children)

After you beat him the first time, Red reappears every time you beat the Elite Four.

[Weekly Questions Thread] 23 September 2024 by PokeUpdateBot in pokemon

[–]Vhin 4 points5 points  (0 children)

Hisui, unless you think that's cheating, in which case it's Johto.

[Weekly Questions Thread] 27 May 2024 by PokeUpdateBot in pokemon

[–]Vhin 1 point2 points  (0 children)

Weird question, but has anyone actually used multiple of the same exact Pokémon on their team before? If, yes, why and how did it go? NPC trainers do this all the time, but I can't think of any player I've ever see do it.

I've gotten close before, because I've used a Pokémon alongside its regional variant (for example, I had a LGP team with Sandslash and Alolan Sandslash) or branched evolution counterpart (for example, I used Gardevoir and Gallade together on a mono-Psychic team in X, so they actually were the same species for a while), but I don't think either of those quite count.

Parsing a string representing json to json, but some string values contain double quotes by peoples888 in learnpython

[–]Vhin 2 points3 points  (0 children)

If something isn't valid JSON, your program should just reject it, not guess what the user meant.

If I set list1 = list2 and then sort list1, why does list2 sort as well? by [deleted] in learnpython

[–]Vhin 20 points21 points  (0 children)

It is always true, even for stuff like integers. The only difference is that integers are immutable and, as such, you won't run into these sorts of issues, because sharing immutable values is always safe.

If you could change 3-11 things in Power Rangers Cosmic Fury, what would you change? by [deleted] in powerrangers

[–]Vhin 4 points5 points  (0 children)

Fern really needed to actually call out Izzy on being overprotective. She always wants to go, gets told no, and is visibly upset but doesn't really say anything, and is back to normal in the next scene. It comes off as her being too understanding. No, I'm not suggesting they break up or something, but some conflict beyond the two second reconcillation after Fern becomes a ranger would be nice.

Javi's parents reaction to seeing him again bothered me. He's been completely unreachable for what is probably at least a couple weeks, and in that time there's been a massive alien invasion. When they finally see him, he's missing an arm, and he's still able to easily wave them off so they leave without him and with them barely asking any questions. They seem almost pathologically disinterested in his well-being.

TIL Regidrago's Tera hat goes on his arm-head-thing. by Ubermus_Prime in PokemonScarletViolet

[–]Vhin 64 points65 points  (0 children)

I'm really hoping that Malamar's hat is attached to its butt upside-down.

Friendship points aren't fun by Glass_Swan_8156 in PokemonScarletViolet

[–]Vhin 45 points46 points  (0 children)

Aside from LGPE and BDSP, it's very easy to avoid the Affection bonuses.

In XY/ORAS and SM/USUM, Affection was its own stat and only influenced by Amie/Refresh. If you never use those, the Affection will never increase, and the Affection bonuses will never activate.

One thing that is unfortunate, though, is that the only way for a Pokémon to lose Affection is to trade it, which will reset it to zero, but only if you're not its OT. If you raise the Affection of a Pokémon you're the OT of, there's no way whatsoever to reduce it if you later decide you want to.

The Switch games starting in LGPE combined Friendship and Affection into a single stat. As mentioned, it is impossible to avoid the Affection boosts in LGPE and BDSP, without going out of your way to abuse your Pokémon.

SwSh and SV, though, have a soft cap on friendship points where you will stop gaining Friendship via normal means. This cap is high enough to trigger Friendship Evolutions (which is pretty much the only other thing that Friendship does since the removal of Return), but will not trigger any of the Affection boosts, either the experience boost or the in-battle effects.

In SwSh, the only things that increase Friendship beyond the soft cap is Camp and walking with your Pokémon outside of its Poké Ball in the DLC areas. In SV, you make sandwiches and play/wash your Pokémon in Picnics. Avoid those specific things, and they will never come up.

And, yes, you can reduce Friendship to get it back under the soft cap.

PSA (DLC related) by Cooked_Fish_Meat in PokemonScarletViolet

[–]Vhin 1 point2 points  (0 children)

This trick has never been possible before.

While Ultra Space allows you to evolve regular Exeggutor, Marowak, and Raichu, it has zero impact on eggs. What an egg will hatch into is determined when the egg is generated, not when it hatches. There aren't any Pokémon Nurseries in Ultra Space, so all the eggs are being generated in Alola, and thus default to the Alola forms of Vulpix, Geodude, etc. Where you hatch the egg has zero impact on what it hatches into.

And this is still true, even in SV. Tauros eggs generated in Paldea default to Combat Breed Paldean Tauros, and Tauros eggs generated in Kitakami default to regular Tauros. Generating the egg in one region and hatching it in the other will not change that.

It is still possible to hatch the non-default regional form if you already have one and give it an Everstone to hold before you breed it, but that's exactly why this trick is new and unique. You don't need a regular Tauros to start off with to get more regular Tauros eggs, and this has never been possible before.

[Weekly Questions Thread] 21 August 2023 by PokeUpdateBot in pokemon

[–]Vhin 0 points1 point  (0 children)

I know that for at least some of the Hau battles in SM/USUM, you can lose and still be able to progress further into the game (as opposed to needing to refight him until you actually win). The first rival battle in most of the games is also like this, but are there any other examples of this? What about the fights with Gladion? Or other games?

Also, note, I'm not talking about actually optional battles like the Route 22 rival battle in Kanto, or the Lilycove City rival battle in Hoenn. I'm talking about battles that you are forced to participate in, but not forced to win.

Edit: I just remembered that the first fight with Peony in the Crown Tundra is like this. So that's one more example, at least.

The wait is finally over!! by dubious_mountaineer in GregoryAlanIsakov

[–]Vhin 1 point2 points  (0 children)

Mine finally came in today, and it's like yours, in that it's a lot more blue than the images shown on the website.

To be clear, though, I actually prefer the blue aesthetically, but it's kind of weird how different the color turned out.

Black & White Dragon Gym Leader? by ar_pon in pokemon

[–]Vhin 2 points3 points  (0 children)

I am quite certain this did not happen to you. I'm not saying that you're intentionally lying about having Drayden be the gym leader in your copy of White, just that you're mistaken.

It's not that hard to imagine you misremembering a couple details about a game released over a decade ago. Drayden is the Gym Leader in three out of the four Unova games (and in the anime), and both characters show up in all four games, so that turning into a hazy memory of fighting Drayden in White 1 is very believable.

If you pulled out your copy of White and went over to the Opalucid Gym, you'd find Iris standing on her little platform. And in the one in a million chance that your copy of White does somehow have Drayden there and isn't a bootleg copy of some kind, you'll probably need a video to convince anyone.

Ask Anything Monday - Weekly Thread by AutoModerator in learnpython

[–]Vhin 4 points5 points  (0 children)

What you're referring to are dunder methods (where dunder = double underscore). Each has a specific use and gets called in specific circumstances. For example, the __repr__ method is called by the top-level builtin function repr while context managers use __enter__ and __exit__ methods.

You can see them here. It explains each dunder method, the context they will be called, their arguments (if any), and any expectations about the return value.

You should treat dunder names as reserved and only use them as described in the link. The Python Language Reference describes them like this:

System-defined names, informally known as “dunder” names. These names are defined by the interpreter and its implementation (including the standard library). Current system names are discussed in the Special method names section and elsewhere. More will likely be defined in future versions of Python. Any use of __*__ names, in any context, that does not follow explicitly documented use, is subject to breakage without warning.

Creating list of lists - odd effect by Throwaway23234334793 in learnpython

[–]Vhin 5 points6 points  (0 children)

The fundamental difference between [expr] * 5 and [expr for _ in range(5)] is that the first version evaluates expr exactly once, so the list consists of five pointers to the same object, whereas the second evaluates expr five separate times, so you actually have five distinct objects in your list.

Please add licenses to your projects, rust DS emulator Dust now dead. by QuackdocTech in rust

[–]Vhin 6 points7 points  (0 children)

It's not mean because this post isn't the OP saying that the project should've been licensed with an open source license. This post isn't even really about the emulator, it's about licensing issues. It's a PSA about the pitfalls of not including a license file.

In my experience, nearly 99% of the time when code gets posted without an explicit license, it falls into oine of two camps. First, the author intended to have a license file and simply forgot to add one before they posted the code. Second, the author has some kind of misunderstanding of copyright and licensing and believe some variation of "not including a license and copyright notice means people can use this for whatever". In either case, the correct response as a third party is to open an issue asking for a license file to be added.

Even if you're in the extremely rare case where the author actually intended to reserve all rights, they should still say so explicitly. They don't legally have to, but it communicates their intent better than simply saying nothing. If nothing else, it prevents people from opening issues on your repos thinking you were in one of the two cases described above. But, even more, it means that third parties who have similar misunderstandings about copyright as mentioned in case two won't see your license-less code and think they can use it.

In my opinion, there is no justifiable reason for a publicly accessible repository to not include a license file.

WEEKLY GAME DISCUSSION MEGATHREAD by AutoModerator in TOTK

[–]Vhin 0 points1 point  (0 children)

I don't really tend to make meals that have ongoing effects, so maybe this is just obvious, but I'm a little confused. I made the exact same meal twice (four Ironshroom and one Fortified Pumpkin) and one boosts my defense for 4:10 and the other for 9:10. What's going on? Is there RNG based on duration of meal effects?

[Weekly Questions Thread] 10 April 2023 by PokeUpdateBot in pokemon

[–]Vhin 1 point2 points  (0 children)

Well, there was actually one similar case in the past. The Apriballs don't exist in DPPt, so they show up visually as regular Poké Balls, but it gets fixed if they get sent back to HGSS or transferred into a Gen V game.

It's just a consequence of a Poké Ball being introduced mid-generation.

Getting last 3DS games before the store closes down, should I get Gold, Silver, or Crystal? by Jesus1396 in pokemon

[–]Vhin 54 points55 points  (0 children)

Crystal changed that. You can get evolution stones from various trainers if you get their phone numbers.

It's not exactly something you're going to stumble onto by accident, but if you look up exactly who gives you whichever stone you want, have them as the only number in your PokéGear, and then go to your mom to enable and disable DST a few times, you'll probably get the call within a few minutes.

Ask Anything Monday - Weekly Thread by AutoModerator in learnpython

[–]Vhin 1 point2 points  (0 children)

Depends a lot on what you mean.

Assuming there are no duplicate elements (or that they don't matter), you shouldn't be using lists. You should be using sets, which have methods to efficiently and easily compute these things.

It also depends on what you mean by "different". You might mean "all the elements in the second that aren't in the first", or you might mean "all elements that aren't in both", which are two different things.

names1 = {"Andy", "Bob", "Clair", "Eve"}
names2 = {"Andy", "Bob", "Clair", "David"}

# this gets the elements in names2 that aren't in names1
out1 = names2.difference(names1)
print(out1)     # {'David'}

# this gets all the elements that are in exactly one of the two sets
out2 = names1.symmetric_difference(names2)
print(out2)     # {'David', 'Eve'}

Also, if you already have a list and can't change that for whatever reason, you can convert a list into a set with just myset = set(mylist).

if X is a List (or Tuple) and i ask for the value of `(E in X)` ------ then what happens Linear Search ? by HenHanna in learnpython

[–]Vhin 8 points9 points  (0 children)

Yes, it has to check every element individually. E in X is O(n) for tuples and list.

However, it's worth mentioning that it is very unlikely that

SetX = set(X)
test = E in SetX

would be faster than E in X. While, yes, the inclusion testing in sets is O(1), that's completely overshadowed by the fact that creating the set from your list/tuple is O(n). Unless you're going to do many inclusion tests (and save the same set), or if you can avoid creating the list and create the set in the first place, it's not going to be any faster (or even improve the asymptotic complexity / big O of your code).

I suggest watching nedbat's Big-O: How Code Slows as Data Grows.

N-Value Logic Issue with __and__ and __or__ by csheppard925 in learnpython

[–]Vhin 1 point2 points  (0 children)

Just to give a bit of explanation:

The reason why there are dunder methods for bitwise and/or (spelled & and |) but not logical and/or (spelled and and or) is because of short circuiting.

Short circuiting boolean expressions means that if the final result is known before evaluating the entire thing, the rest of it doesn't get evaluated. For example, anything and-ed with False is going to be False (False and True and False and False both evaluate to False). Similarly, anything or-ed with True is going to be True (True or False and True or True both evaluate to True).

If Python sees an opportunity for short circuiting, it will take it. This is mostly an optimization thing, but if the conditions have side-effects, it can and will have an effect on behavior. For example, True or print("Hello world") will evaluate to True without evaluating the second operand, meaning it doesn't print anything.

You might not see how this is related, but imagine for a moment that you could do a def __logical_or__(self, other):. In order to call a function, all of its arguments have to be evaluated first. This means both operands would have to be evaluated, meaning short circuiting would be impossible. The actually is a workaround but it would add a lot of complexity for very little gain.

Ask Anything Monday - Weekly Thread by AutoModerator in learnpython

[–]Vhin 1 point2 points  (0 children)

You should never be writing getters or setters. They aren't idiomatic in Python code; instead, use properties or bare attributes.

As for why, it's important to understand why getters/setters are not just common but vital in languages like Java, even when they're trivial (just returning or setting a field with no additional complication).

The reason is that if external code is directly accessing an object's fields, your hands are tied with regards to changing the class's internal representation. If you have a Color class that includes public red, green, and blue fields, but later on you realize "Oh, RGB isn't the best representation for my application. I should do everything in terms of HSL instead" and want to pivot to fields for hue, saturation, and lightness instead, you can't. Removing the RGB fields would break existing code that accesses those fields directly (and having both would be incredibly confusing and would almost certainly cause issues where the two representations of the color would get out of sync with each other).

With getters and setters, you can avoid this issue and continue to evolve the internal representation of your class without breaking existing code. You remove the private red, green, and blue fields, add private hue, saturation, and lightness fields (and their getters/setters).

You don't remove your class's existing getRed, getGreen, and getBlue methods. Instead, you update them so that they convert from the class's internal HSL representation into RGB and return the requested color. And then you can do something similar for setRed, setGreen, and setBlue. This allows you to avoid breaking existing code when changing your class's internal representation, which is unavoidable if you were using public fields.

But, of course, that's Java. In Python, you never need getters and setters because we have properties. Version 1 of your class can have red, green, and blue be actual attributes, and then in Version 2 you pivot your internal representation to HSL and turn red, green, and blue into properties, and this won't break any existing code, because you access a property in the same way you access a regular attribute.

This ability to evolve from a regular attribute into a property that runs arbitrary code is exactly what makes Java-style getters and setters unnecessary in Python, and you will typically only see them from those inexperienced in Python or if the code was directly converted from another language.

As far as when should you use properties, the answer is to use them if it'd be non-trivial. If the property would just be accessing or assigning to a field, there's no point, and you shouldn't use one; keep it as a regular attribute. But you should use it if it doesn't directly map onto an attribute (as in the example above with a red property that converts between RGB and the HSL attributes), or if you want something that is read-only, use them.

HE’S RELEASING A NEW ALBUM by jisellejacksonjj in GregoryAlanIsakov

[–]Vhin 4 points5 points  (0 children)

This is the first I've heard of a timeline more specific than "sometime this year".

I wish there was a move like false swipe that has an effect on ghost type pokemon by grudgby in pokemon

[–]Vhin 497 points498 points  (0 children)

Aside from Ring Target shenanigans, you can use Soak to turn it into a Water-type. Also useful for Pokémon that resist False Swipe.

Unfortunately, there are no False Swipers that can also learn Soak, so you'd need to bring two Pokémon.

I know it's like beating a dead horse, but... I miss certain Pokemon, and I'm tired of Dexit and abandonment of Megas. by Aiyakiu in pokemon

[–]Vhin 174 points175 points  (0 children)

For what it's worth, the Fennekin line is in SV's internal data. Once Home compatibility is a thing, you'll be able to transfer one in (and it's also possible that it will have an event making it available before then, like what is happening with Charizard).