From dc103f6d91be1c2ac79d86bbce6eb90179e81e24 Mon Sep 17 00:00:00 2001
From: unknown <marcus.gagelmann@student.uni-halle.de>
Date: Wed, 15 Jul 2020 10:44:07 +0200
Subject: [PATCH] kill enemy -> delete his icon

---
 out/main.js  |  7 +++++++
 src/Main.elm | 13 +++++++------
 2 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/out/main.js b/out/main.js
index ea944b5..ab1a514 100644
--- a/out/main.js
+++ b/out/main.js
@@ -8146,7 +8146,14 @@ var $author$project$Main$update = F2(
 					_Utils_update(
 						model,
 						{
+							activeTooltip: '',
+							characterList: $author$project$Main$generateIconIdents(
+								A2(
+									$elm$core$List$filter,
+									$author$project$Main$isNotId(index + 1),
+									model.characterList)),
 							enemy: A2($elm_community$array_extra$Array$Extra$removeAt, index, model.enemy),
+							highlightedTableRow: 0,
 							showAttackModal: $rundis$elm_bootstrap$Bootstrap$Modal$hidden,
 							showDeathAlert: $rundis$elm_bootstrap$Bootstrap$Modal$shown
 						}),
diff --git a/src/Main.elm b/src/Main.elm
index 73cd184..1527515 100644
--- a/src/Main.elm
+++ b/src/Main.elm
@@ -76,12 +76,13 @@ update msg model =
             )
 
         CharacterDeath index ->
-            (
-                { model | showDeathAlert = Modal.shown
-                , enemy = Array.removeAt index model.enemy
-                , showAttackModal = Modal.hidden
-                }
-                , Cmd.none
+            ( { model | showDeathAlert = Modal.shown
+                      , enemy = Array.removeAt index model.enemy
+                      , showAttackModal = Modal.hidden
+                      , characterList = generateIconIdents (List.filter (isNotId (index+1)) model.characterList)
+                      , highlightedTableRow = 0
+                      , activeTooltip = "" }
+            , Cmd.none
             )
 
         MyDrop1Msg state ->
-- 
GitLab