Well look what got necro'd. I just happen to have found some leftovers in a can. Not sure if they'll be useful, I don't think any of it's still alive or anything.
I scraped this out of one can:
https:/// **** ORPHAN PARTS ****
AttackFurthestWeakTile(){
https:// select all tiles that can be reached by current unit
https:// select all non-pathable tiles adjacent to currently selected tiles, replacing current selection
https:// order tiles from weakest to strongest
https:// select the most distant tile that is as weak as the weakest
https:// attempt to attack tile.
https:// if attack fails, flag tile as non-reachable
https:// if attack succeeds but does not destroy tile, continue attacking
https:// if tile becomes path-able, attempt to resume normal pathing tactics
}
ClearLargerPathToDestination(destination){
https://note: before quitting: check whether targeted tiles can be destroyed by equipped weapons
https:// Select 'groupA' all tiles along 1x1 path to destination
https:// select 'groupB' all adjacent tiles to groupA that are non path-able, indexing to groupA tiles
https:// select 'groupC' all tiles opposite GroupA tiles that are non-pathable from indexed GroupB tiles , indexing to groupA tiles
https:// deselect all groupA tiles that are lacking an indexed groupB tile IF the next or previous tile also lacks a groupB tile
https:// repeat with GroupC instead of groupB tiles
https:// Loop through each groupB and groupC tile, flagging to pathable and attempting to path a 2x2 to destination.
https:// if a success is made, attempt to destroy the offending tile and quit.
https:// If destination was not reached and the total groupB and groupC tiles are less then 8, test all combinations of tiles
https:// If any combination succedes, select the combination with the lowest number of tiles,
https:// lowest maximum single tile strength, and lowest total strength of all tiles. Attempt to destroy them and then quit.
https:// If the battle hasn't begun, flag spawn point as Jailed2x2 and quit.
https://Note2: 2x2 units should be placed in non-jailed spawn points before battle start, elsewhere in code.
}
I scraped this out of the other can: