giero / LGoH-deck-suggester

Experimental tool for suggesting decks in "Legendary: Game of Heroes" according to your cards.
GNU General Public License v3.0
1 stars 2 forks source link

Invalid leader ability format for some special Legends #21

Closed maceh closed 6 years ago

maceh commented 6 years ago

Coming across an error when trying to update the spreadsheet and load it in the viewer, with this error specifically:

... and it's failed for [earth] Cernunnos, Young God ****

Invalid leader ability format "Earth Legendary Power I: 125% Damage REC and HP for all Legend Heroes in all activities, 200% Damage REC and HP for all Heroes in the Legend Trials, In the Legend Trials, Break Flood Armor by 2 per regular hero attack"

Had a look at the data (entered by someone else) and noticed the missing ',' between Damage and REC but was still getting the error (maybe cached data?) so started poking around the hero_loader.js and parser.php. I'm thinking that because the Leader Skill for some of these special Legends Heroes actually have some overloaded descriptions, so in this case it's actually got different Leader Skills in and out of Legend Trials (recent addition I guess):

Hero: Cernunnos, Young God (you can see his description in Forge > Legend > Druid Circle)

Earth Legendary Power I: 125% Damage REC and HP for all Legend Heroes in all activities except Legend Trials. 200% Damage, REC and HP for all Heroes in the Legend Trials, In the Legend Trials, Break Flood Armor by 2 per regular hero attack.

As a workaround for now - I'm thinking shortening the Leader Skill to this seems to work and pass the regex: Earth Legendary Power I: 125% Damage, REC and HP for all Legend Heroes

giero commented 6 years ago

Earth Legendary Power I: 125% Damage REC and HP for all Legend Heroes in all activities except Legend Trials. 200% Damage, REC and HP for all Heroes in the Legend Trials, In the Legend Trials, Break Flood Armor by 2 per regular hero attack.

That's the Leader Skill?? Holy crap - this game ...

But yes, Earth Legendary Power I: 125% Damage, REC and HP for all Legend Heroes will be good workaround :)

maceh commented 6 years ago

I kinda figured this one out as I was posting this, and did have a quick look at your regex to at least fix the missing comma between Damage/REC in the data.

I think this is a much rarer case (probably only about 10 heroes with this type of multi-context skill), and since it's not doing calculations for the best team for Legend Trial events - this one isn't a big deal at the moment and happy for this to be closed :)