# Battle end

What the DS shows when a battle ends and the results screen after a win, read from the game's code. Screen px (256 × 192 per screen), ticks of 1/60 s. What it means is in `/llm.md`, section "Battle end". Same data as `/data/battle-end.json`.

## Outcomes

| action | action_id | outcome | results_screen | word | word_when_time_limit | song |
|---|---|---|---|---|---|---|
| GameClearStart | 3 | won | true | win | — | 11 SEQ_WIN |
| GameLostClearStart | 5 | won | true | lose | — | 12 SEQ_LOSE |
| GameEvenStart | 6 | draw | false | draw | — | 12 SEQ_LOSE |
| GameOverStart | 2 | lost | false | lose | time_over | 12 SEQ_LOSE |

## Battle

| rule | value |
|---|---|
| stops_sound | {"id":26,"name":"SE_MAGIC_EISHO"} |
| chant_in_progress | cancelled |
| units | frozen: no movement, AI or triggers; still drawn |
| victory_pose | false |
| settle_ticks | 30 |
| waits_while_song_plays | {"n":12,"code":"SEQ_LOSE","url":"/audio/musica/12-derrota.m4a"} |

## Banner

| field | value |
|---|---|
| screen | bottom |
| at_px | [128,96] |
| fixed_to | screen |
| ticks | {"circle_only":31,"shown":31,"held":61,"circle_leaving":31,"total":154} |
| word_alpha | {"while_shown":1,"after_held":0} |
| circle | {"same_as":"/data/chant-screen.json circle and dim_layer","appears":"when the banner starts, as in the chant","leaves_at_tick":123,"exit":{"turn_deg_per_tick":23.9996,"alpha_step_per_tick":-0.03225806451612903},"removed":"with the banner, together with the dim layer"} |
| start | {"word":"start","when":"before play, same timeline","skipped_by_native":46} |

| word | sequence | en | es | fr | de |
|---|---|---|---|---|---|
| start | 0 | /juego/fin/palabras/start-en.png (203 × 49, pivot 100, 22) | /juego/fin/palabras/start-es.png (128 × 32, pivot 64, 16) | /juego/fin/palabras/start-fr.png (136 × 32, pivot 70, 16) | /juego/fin/palabras/start-de.png (144 × 32, pivot 71, 16) |
| win | 1 | /juego/fin/palabras/win-en.png (144 × 40, pivot 71, 20) | /juego/fin/palabras/win-es.png (208 × 32, pivot 104, 16) | /juego/fin/palabras/win-fr.png (152 × 40, pivot 77, 24) | /juego/fin/palabras/win-de.png (240 × 32, pivot 120, 16) |
| lose | 2 | /juego/fin/palabras/lose-en.png (152 × 48, pivot 72, 26) | /juego/fin/palabras/lose-es.png (200 × 32, pivot 97, 16) | /juego/fin/palabras/lose-fr.png (144 × 32, pivot 70, 16) | /juego/fin/palabras/lose-de.png (224 × 32, pivot 110, 16) |
| draw | 3 | /juego/fin/palabras/draw-en.png (176 × 48, pivot 85, 24) | /juego/fin/palabras/draw-es.png (168 × 32, pivot 83, 16) | /juego/fin/palabras/draw-fr.png (232 × 32, pivot 116, 16) | /juego/fin/palabras/draw-de.png (232 × 32, pivot 114, 16) |
| time_over | 4 | /juego/fin/palabras/time-over-en.png (160 × 88, pivot 78, 43) | /juego/fin/palabras/time-over-es.png (160 × 64, pivot 76, 32) | /juego/fin/palabras/time-over-fr.png (200 × 72, pivot 94, 36) | /juego/fin/palabras/time-over-de.png (256 × 64, pivot 128, 31) |

## Fade out

| field | value |
|---|---|
| to | black |
| screens | both |
| ticks | 30 |

## Results: experience (phase 0)

Song 10 SEQ_QUESTCL from the first results screen. Phases in order: exp, item, monster, magic.

| screen | piece | at_px | picture |
|---|---|---|---|
| top | background | 0, 0 | /juego/fin/resultados/fondo-top01.png |
| top | Isaac LV label | 120, 33 | /juego/fin/resultados/lv-label.png |
| top | Isaac level text %2d | 136, 33 | — |
| top | Isaac EXP bar (fill 62 px) | 120, 52 | /juego/fin/resultados/bar-frame-64.png, /juego/fin/resultados/bar-back-64.png, /juego/fin/resultados/bar-fill.png |
| top | Isaac level up | 32, 24 | /juego/fin/resultados/sube-en.png |
| top | squad 1 icon; plate +31,0, level +50,14, bar +67,20 (fill 46 px) | 68, 72 | /juego/fin/resultados/squad-plate.png |
| top | squad 2 icon; plate +31,0, level +50,14, bar +67,20 (fill 46 px) | 68, 112 | /juego/fin/resultados/squad-plate.png |
| top | squad 3 icon; plate +31,0, level +50,14, bar +67,20 (fill 46 px) | 68, 152 | /juego/fin/resultados/squad-plate.png |
| bottom 1 | background | 0, 0 | /juego/fin/resultados/fondo-btm01.png |
| bottom 1 | title | 96, 16 | /juego/fin/resultados/title-en.png |
| bottom 1 | clear_time | 16, 48 | /juego/fin/resultados/clear-time-en.png |
| bottom 1 | defeated | 16, 72 | /juego/fin/resultados/defeated-en.png |
| bottom 1 | survival | 16, 96 | /juego/fin/resultados/survival-en.png |
| bottom 1 | exp | 72, 120 | /juego/fin/resultados/exp-en.png |
| bottom 1 | clear_time text %02d:%02d:%02d | 147, 48 | — |
| bottom 1 | defeated text %2d | 147, 72 | — |
| bottom 1 | survival text %3d.%02d%% | 147, 96 | — |
| bottom 1 | exp_pool text %4d | 147, 120 | — |
| bottom 2 | background | 0, 0 | /juego/fin/resultados/fondo-btm02.png |
| bottom 2 | fire icon | 174, 57 | /juego/fin/resultados/elemento-fire.png |
| bottom 2 | wind icon | 66, 57 | /juego/fin/resultados/elemento-wind.png |
| bottom 2 | water icon | 64, 120 | /juego/fin/resultados/elemento-water.png |
| bottom 2 | earth icon | 176, 120 | /juego/fin/resultados/elemento-earth.png |
| bottom 2 | dark icon | 120, 151 | /juego/fin/resultados/elemento-dark.png |
| bottom 2 | light icon | 120, 23 | /juego/fin/resultados/elemento-light.png |
| both | next button (pivot centre) | 232, 168 | /juego/fin/resultados/siguiente-en.png |

| rule | value |
|---|---|
| radar | {"centre_px":[128,96],"scale":[68,50],"level_offset":10,"colours":{"level":"#ff0000","rank":"#00ff00"}} |
| waits_ticks | [30,60,30,60] |
| sounds | {"count_step":18,"level_up":19,"element_step":20} |
| previews | {"en":{"top":"/juego/fin/resultados/vista-top-en.png","bottom_page1":"/juego/fin/resultados/vista-bottom-page1-en.png","bottom_page2":"/juego/fin/resultados/vista-bottom-page2-en.png"},"es":{"top":"/juego/fin/resultados/vista-top-es.png","bottom_page1":"/juego/fin/resultados/vista-bottom-page1-es.png","bottom_page2":"/juego/fin/resultados/vista-bottom-page2-es.png"}} |

## Results: items and monsters (phases 1, 2)

| field | value |
|---|---|
| backgrounds | {"item":"/juego/fin/resultados/fondo-itm.png","monster":"/juego/fin/resultados/fondo-unt.png","item_list":"/juego/fin/resultados/fondo-itmlist.png","monster_list":"/juego/fin/resultados/fondo-untlist.png","item_top":"/juego/fin/resultados/fondo-item_top.png","item_top_window":"/juego/fin/resultados/fondo-item_window.png"} |
| buttons | {"options":[{"sequence":6,"at_px":[16,128],"size_px":[104,48]},{"sequence":7,"at_px":[136,128],"size_px":[104,48]}],"confirm":[{"sequence":8,"at_px":[48,140],"size_px":[56,24]},{"sequence":9,"at_px":[168,140],"size_px":[56,24]}]} |
| button_images | {"en":{"6":{"url":"/juego/fin/resultados/botones-en-6.png","pivot_px":[0,0]},"7":{"url":"/juego/fin/resultados/botones-en-7.png","pivot_px":[0,0]},"8":{"url":"/juego/fin/resultados/botones-en-8.png","pivot_px":[0,0]},"9":{"url":"/juego/fin/resultados/botones-en-9.png","pivot_px":[0,0]},"10":{"url":"/juego/fin/resultados/botones-en-10.png","pivot_px":[0,0]},"11":{"url":"/juego/fin/resultados/botones-en-11.png","pivot_px":[0,0]}},"es":{"6":{"url":"/juego/fin/resultados/botones-es-6.png","pivot_px":[0,0]},"7":{"url":"/juego/fin/resultados/botones-es-7.png","pivot_px":[0,0]},"8":{"url":"/juego/fin/resultados/botones-es-8.png","pivot_px":[0,0]},"9":{"url":"/juego/fin/resultados/botones-es-9.png","pivot_px":[0,0]},"10":{"url":"/juego/fin/resultados/botones-es-10.png","pivot_px":[0,0]},"11":{"url":"/juego/fin/resultados/botones-es-11.png","pivot_px":[0,0]}},"fr":{"6":{"url":"/juego/fin/resultados/botones-fr-6.png","pivot_px":[0,0]},"7":{"url":"/juego/fin/resultados/botones-fr-7.png","pivot_px":[0,0]},"8":{"url":"/juego/fin/resultados/botones-fr-8.png","pivot_px":[0,0]},"9":{"url":"/juego/fin/resultados/botones-fr-9.png","pivot_px":[0,0]},"10":{"url":"/juego/fin/resultados/botones-fr-10.png","pivot_px":[0,0]},"11":{"url":"/juego/fin/resultados/botones-fr-11.png","pivot_px":[0,0]}},"de":{"6":{"url":"/juego/fin/resultados/botones-de-6.png","pivot_px":[0,0]},"7":{"url":"/juego/fin/resultados/botones-de-7.png","pivot_px":[0,0]},"8":{"url":"/juego/fin/resultados/botones-de-8.png","pivot_px":[0,0]},"9":{"url":"/juego/fin/resultados/botones-de-9.png","pivot_px":[0,0]},"10":{"url":"/juego/fin/resultados/botones-de-10.png","pivot_px":[0,0]},"11":{"url":"/juego/fin/resultados/botones-de-11.png","pivot_px":[0,0]}}} |
| found_row_at_px | {"unit":[52,72],"item":[60,72]} |
| list_images | {"9":{"url":"/juego/fin/resultados/lista-9.png","pivot_px":[0,0]},"24":{"url":"/juego/fin/resultados/lista-24.png","pivot_px":[0,0]},"25":{"url":"/juego/fin/resultados/lista-25.png","pivot_px":[0,0]},"26":{"url":"/juego/fin/resultados/lista-26.png","pivot_px":[0,0]},"30":{"url":"/juego/fin/resultados/lista-30.png","pivot_px":[0,0]},"31":{"url":"/juego/fin/resultados/lista-31.png","pivot_px":[0,0]},"39":{"url":"/juego/fin/resultados/lista-39.png","pivot_px":[0,0]},"40":{"url":"/juego/fin/resultados/lista-40.png","pivot_px":[0,0]},"41":{"url":"/juego/fin/resultados/lista-41.png","pivot_px":[0,0]},"42":{"url":"/juego/fin/resultados/lista-42.png","pivot_px":[0,0]}} |
| back_button | {"2":{"url":"/juego/fin/resultados/volver-2.png","pivot_px":[16,16]},"4":{"url":"/juego/fin/resultados/volver-4.png","pivot_px":[16,16]},"6":{"url":"/juego/fin/resultados/volver-6.png","pivot_px":[16,16]},"8":{"url":"/juego/fin/resultados/volver-8.png","pivot_px":[16,16]}} |
| unit_element_icons | ["/juego/fin/resultados/elemento-unidad-0.png","/juego/fin/resultados/elemento-unidad-1.png","/juego/fin/resultados/elemento-unidad-2.png","/juego/fin/resultados/elemento-unidad-3.png","/juego/fin/resultados/elemento-unidad-4.png","/juego/fin/resultados/elemento-unidad-5.png","/juego/fin/resultados/elemento-unidad-6.png"] |

## Results: new magic (phase 3)

| field | value |
|---|---|
| background | /juego/fin/resultados/fondo-mgc.png |
| top_background | /juego/fin/resultados/fondo-magic_top.png |
| row_at_px | [32,76] |
| images | {"9":{"url":"/juego/fin/resultados/hechizo-9.png","pivot_px":[0,0]},"10":{"url":"/juego/fin/resultados/hechizo-10.png","pivot_px":[0,0]},"11":{"url":"/juego/fin/resultados/hechizo-11.png","pivot_px":[0,0]},"12":{"url":"/juego/fin/resultados/hechizo-12.png","pivot_px":[0,0]},"13":{"url":"/juego/fin/resultados/hechizo-13.png","pivot_px":[0,0]},"14":{"url":"/juego/fin/resultados/hechizo-14.png","pivot_px":[0,0]},"15":{"url":"/juego/fin/resultados/hechizo-15.png","pivot_px":[0,0]},"16":{"url":"/juego/fin/resultados/hechizo-16.png","pivot_px":[0,0]},"17":{"url":"/juego/fin/resultados/hechizo-17.png","pivot_px":[0,0]},"18":{"url":"/juego/fin/resultados/hechizo-18.png","pivot_px":[0,0]},"19":{"url":"/juego/fin/resultados/hechizo-19.png","pivot_px":[0,0]},"20":{"url":"/juego/fin/resultados/hechizo-20.png","pivot_px":[0,0]},"21":{"url":"/juego/fin/resultados/hechizo-21.png","pivot_px":[0,0]},"22":{"url":"/juego/fin/resultados/hechizo-22.png","pivot_px":[0,0]},"23":{"url":"/juego/fin/resultados/hechizo-23.png","pivot_px":[0,0]},"24":{"url":"/juego/fin/resultados/hechizo-24.png","pivot_px":[0,0]},"25":{"url":"/juego/fin/resultados/hechizo-25.png","pivot_px":[0,0]},"26":{"url":"/juego/fin/resultados/hechizo-26.png","pivot_px":[0,0]},"27":{"url":"/juego/fin/resultados/hechizo-27.png","pivot_px":[0,0]},"28":{"url":"/juego/fin/resultados/hechizo-28.png","pivot_px":[0,0]},"29":{"url":"/juego/fin/resultados/hechizo-29.png","pivot_px":[0,0]},"30":{"url":"/juego/fin/resultados/hechizo-30.png","pivot_px":[0,0]},"31":{"url":"/juego/fin/resultados/hechizo-31.png","pivot_px":[0,0]},"32":{"url":"/juego/fin/resultados/hechizo-32.png","pivot_px":[0,0]},"33":{"url":"/juego/fin/resultados/hechizo-33.png","pivot_px":[0,0]},"34":{"url":"/juego/fin/resultados/hechizo-34.png","pivot_px":[0,0]}} |

## Confidence

| finding | confidence |
|---|---|
| outcome_words_and_songs | verified |
| banner_picture_and_place | verified |
| banner_timeline | verified |
| banner_checked_in_emulator | verified |
| circle_and_dim_layer | verified |
| circle_exit | verified |
| no_victory_pose | verified |
| units_keep_animating | likely |
| chant_cancelled | verified |
| defeat_waits_for_song | likely |
| fade_to_black | likely |
| results_layout | verified |
| results_timeline | verified |
| results_input | verified |
| bar_fill_formula | likely |
| radar_order | verified |
| radar_alpha | unknown |
| text_font | not_decoded |
| fade_ticks_results | unknown |
