Thread:Sylvandyr/@comment-8247142-20130416053205/@comment-4830404-20130701034322

Well, my blog just copies the data word for word, but for the Battle Arena page we have to flip everything manually.

So for Diamond the data says strengths: ["diamond", "gold"] weaknesses: []

For every strength, the player's dragon's type should be listed under the appropriate "use" section. So for the Diamond type having the "Diamond" and "Gold" strengths, the player's Diamond type should be listed under the enemy Diamond for "Use" and also the enemy Gold for "Use". Diamond would never appear in Avoid Using because it has no weaknesses.

Same with Dino for the Mythic/Cosmic bits.

For everything else they can just be reverse copy/pasted *only* because every other strength under one type is included as a weakness for the other type. However, it's important to realize that Use/Avoid Using and the actual data cannot actually just be flipped with copying the strengths/weaknesses into the opposite sections.

The code only cares about the player's perspective looking at the enemy. Player Diamond vs. enemy Diamond gets extra points because the enemy's Diamond type appears in the strengths list of the player's Diamond and does NOT appear in the weakness list for Diamond. So, while we would Use Diamond against Diamond, we would not Avoid Using Diamond against Diamond (because the enemy's strengths/weaknesses don't matter; only the player's do). That's why Diamond vs. Diamond is not a stalemate. Because only the player's side counts.