selfDestruct logs

I was reviewing the logged events on selfDestruct and how to use them… and there are few things that don’t seem correct, at least for me:

[25,13],[[25,14],[26,14]],15,3,“432”,1]
  1. in the selfDestruct event, the 2nd parameter is list of all enemy walls in range. Which seems randomized … and does not seem to follow logic (spawn, proximity, direction…) this can create 2 different logs for the same event.
  2. in the selfDestruct event, the 3rd parameter is the “possible damage done” by the explosion (which is the unit starter health) and is immediately followed by the unit (type) index, which makes it redundant, even if this is used to create the Attack events latter… the damage information is not useful.
  3. Each unit that selfDestrcuts logs a attack / damage event to all walls in range REGARDLESS if they are alive or not. This is very different from the standard targeting logic, where damage can overflow, but death units are not targeted or hit. This creates the impression (logs) for way more damage then what actually happened.
  4. After selfDestruct, the units perform a normal targeting and damage for the frame. It was discussed before and is mentioned in the docs to expect it. But does not seem very logical and looks more like side effect of the code complexity of this event that is hard to be removed.

The main things that bothers me personally is 3. attack / damage logs are potentially flooded (with possible incorrect) self destruct information, and you can not rely on them unless you double check for selfDestrcut, and calculate them properly.

I know logs are something that is not touched often, as it effect EVERYTHING, but hopefully this may be helpful at a future refactoring.

image

Event Log

“events”:{
“selfDestruct”:[
[[25,13],[[25,14],[26,14]],15,3,“432”,1],
[[25,13],[[25,14],[26,14]],15,3,“433”,1],
[[25,13],[[25,14],[26,14]],15,3,“434”,1],
[[25,13],[[26,14],[25,14]],15,3,“435”,1],
[[25,13],[[26,14],[25,14]],15,3,“436”,1],
[[25,13],[[26,14],[25,14]],15,3,“437”,1],
[[25,13],[[25,14],[26,14]],15,3,“438”,1],
[[25,13],[[26,14],[25,14]],15,3,“439”,1]],
“breach”:[],
“damage”:[
[[25,14],15,0,“421”,2],
[[26,14],15,0,“53”,2],
[[25,14],15,0,“421”,2],
[[26,14],15,0,“53”,2],
[[25,14],15,0,“421”,2],
[[26,14],15,0,“53”,2],
[[26,14],15,0,“53”,2],
[[25,14],15,0,“421”,2],
[[26,14],15,0,“53”,2],
[[25,14],15,0,“421”,2],
[[26,14],15,0,“53”,2],
[[25,14],15,0,“421”,2],
[[25,14],15,0,“421”,2],
[[26,14],15,0,“53”,2],
[[26,14],15,0,“53”,2],
[[25,14],15,0,“421”,2],

[[25,15],2,2,“38”,2],
[[25,15],2,2,“38”,2],
[[25,15],2,2,“38”,2],
[[25,15],2,2,“38”,2],
[[25,15],2,2,“38”,2],
[[25,15],2,2,“38”,2],
[[25,15],2,2,“38”,2],
[[25,15],2,2,“38”,2],
],
“death”:[
[[25,13],3,“432”,1,false],
[[25,13],3,“433”,1,false],
[[25,14],0,“421”,2,false],
[[25,13],3,“434”,1,false],
[[26,14],0,“53”, 2,false],
[[25,13],3,“435”,1,false],
[[25,13],3,“436”,1,false],
[[25,13],3,“437”,1,false],
[[25,13],3,“438”,1,false],
[[25,13],3,“439”,1,false]],
“attack”:[
[[25,13],[25,15],2,3,“432”,“38”,1],
[[25,13],[25,15],2,3,“433”,“38”,1],
[[25,13],[25,15],2,3,“434”,“38”,1],
[[25,13],[25,15],2,3,“435”,“38”,1],
[[25,13],[25,15],2,3,“436”,“38”,1],
[[25,13],[25,15],2,3,“437”,“38”,1],
[[25,13],[25,15],2,3,“438”,“38”,1],
[[25,13],[25,15],2,3,“439”,“38”,1],],
}}

2 Likes

Thanks for the feedback, a note has been made on the backlog and this will be looked into next time that part of the codebase is refactored/updated