Daken strikes stolen by Hair Meddle [Investigating]
St_Bernadus
Posts: 640 Critical Contributor
Opposing Medusa uses Hair Meddle to shuffle and steal special tiles. In the ensuing shuffle, a green match is made and my Daken generates 2 strikes as a result. Upon completion of the shuffle, specials moved are swapped to Medusa's side. And that included the strike tiles just generated by Daken, even though they were just produced and not moved by hair meddle.
I think this is not as intended.
//Edited Title -Brigby
I think this is not as intended.
//Edited Title -Brigby
0
Comments
-
Hair Meddle seems to work based purely on board coordinates, rather than tracking the specific tiles. So if she swaps a tile to the third tile down in the second row from the left, once the board settles, she will steal any A/P/S tile that might be the third down in the second row, regardless of whether that tile was actually one she swapped there, or one that fell there during a resulting cascade, or one that was generated during the process of the board settling and didn't even exist when the power was fired.Note that it works both ways. In addition to the above, if she did swap an A/P/S tile to that location, and it then fell to a spot where she hadn't swapped a tile, it won't be stolen.Given that this issue has existed since she was first released, I'm fairly certain that it's considered more trouble than it's worth to fix, and this is how it's going to continue working for the foreseeable future, regardless of whether or not it was the original intent.1
-
tl;dr@TPF Alexis is correct. I did a detailed explanation on this on a bug report in the forum ages ago when this bug was first reported. The reason it happens the way @TPF Alexis stated is that in the code, the tiles don't exist as directly referable objects. The board is kept as an array with states at each array reference. So when the board changes between the "shuffle" and the "steal" portions of the power, the power is unaware.========Full explanation & example:the MPQ board is an 8x8 array where every tile can be referenced by an ordered pair of (row, column) starting in the upper left. So the upper left is (0,0) the upper right (0,7) the lower left (7,0) and the lower right is (7,7). When the code makes a check at a given tile, it would do something like this:tile(3,5).attributes()This will return something like the following:{"row": 3, "column": 5, "color": "blue", "special": {"type": strike, "value": 58, "ownership": "friendly"}}This referral-based identification is important when it comes to power like Medusa. Her power shuffles the tiles by swapping their attributes from the source tile to the target tile. Because the tiles don't actually exist as discreet objects, only the attributes are being swapped. Her power specifically says to swap the tiles, then steal (and improve) and swapped specials. To do so, an "action stack" is created. The action stack (programmatically) looks something like this:[swap_tiles(), resolve_stolen_special_tiles()]The first item in the array is evaluated, then removed. As long as there are still actions in the stack, the code continues to evaluate the first item in the stack, then remove it. So lets walk through executing Medusa's Hair Meddle:1. Check if there are actions in the action stack (there are)2. Evaluate and remove the first action (swap_tiles())2.1 The action stack is now [resolve _stolen_special_tiles()]2.2 the pairs of tiles are swapped and a list of each ordered pair representing the tiles that moved is kept.2.3 Any movement of tiles adds the action "check_for_matches()" and "check_for_dead_board()" to the action queue (anyone remember the bug where the board could become unplayable with no matches and the only way to continue was resign the match?)2.4 This makes the action stack look like this: [check_for_matches(), check_for_dead_board(), resolve_stolen_special_tiles()]3. Now we go back to step 1 and check for actions (still more to do)4. Evaluate the first action and remove (check_for_matches())4.1 Matches are removed (any green ones making strike tiles for Daken)4.2 any tile that has been removed steals the attributes of the first tile above it that has attributes (making that tile blank)4.3 and blank tile with no tiles above it is randomly given a basic tile's attribute.4.4 action stack now looks like this: [check_for_dead_board(), resolve_stolen_special_tiles()]5. Go back to step 1 and check for actions again (still more)6. grab the next action and remove it from the stack (check_for_dead_board())6.1 are there any available moves? yes, so do nothing6.2 action stack = [resolve _stolen_special_tiles()]7. check the action stack again (still have stuff to do)8. grab the next action off the stack and evaluate (resolve _stolen_special_tiles())8.1 Get the list of tile locations swapped in step 2.2 (note, these are the locations and NOT the attributes of the locations, which may have changed since then)8.2 Loop through the list. If any of the attributes have the "special" key in t, check to see if the type of that key is in ("strike", "protect", "attack")8.3 if so, check the "ownership" key.8.4 if ownership is "opponent", then change the value to "friendly" and add 150 to the "value" key9. check the action stack again See that it's empty and end the action.
5 -
I just wanted to say that was way more than I expected! Wow!
0
Categories
- All Categories
- 44.8K Marvel Puzzle Quest
- 1.5K MPQ News and Announcements
- 20.3K MPQ General Discussion
- 3K MPQ Tips and Guides
- 2K MPQ Character Discussion
- 171 MPQ Supports Discussion
- 2.5K MPQ Events, Tournaments, and Missions
- 2.8K MPQ Alliances
- 6.3K MPQ Suggestions and Feedback
- 6.2K MPQ Bugs and Technical Issues
- 13.6K Magic: The Gathering - Puzzle Quest
- 508 MtGPQ News & Announcements
- 5.4K MtGPQ General Discussion
- 99 MtGPQ Tips & Guides
- 424 MtGPQ Deck Strategy & Planeswalker Discussion
- 299 MtGPQ Events
- 60 MtGPQ Coalitions
- 1.2K MtGPQ Suggestions & Feedback
- 5.7K MtGPQ Bugs & Technical Issues
- 548 Other 505 Go Inc. Games
- 21 Puzzle Quest: The Legend Returns
- 5 Adventure Gnome
- 6 Word Designer: Country Home
- 381 Other Games
- 142 General Discussion
- 239 Off Topic
- 7 505 Go Inc. Forum Rules
- 7 Forum Rules and Site Announcements