diff --git a/FlufflParty/.idea/.idea.FlufflParty/.idea/workspace.xml b/FlufflParty/.idea/.idea.FlufflParty/.idea/workspace.xml
index 9886c16..9dd6760 100644
--- a/FlufflParty/.idea/.idea.FlufflParty/.idea/workspace.xml
+++ b/FlufflParty/.idea/.idea.FlufflParty/.idea/workspace.xml
@@ -3,10 +3,8 @@
-
+
-
-
@@ -154,7 +152,7 @@
-
+
diff --git a/FlufflParty/Assets/Scripts/Players/NoPlayablePlayer.cs b/FlufflParty/Assets/Scripts/Players/NoPlayablePlayer.cs
index e02269d..9e231d7 100644
--- a/FlufflParty/Assets/Scripts/Players/NoPlayablePlayer.cs
+++ b/FlufflParty/Assets/Scripts/Players/NoPlayablePlayer.cs
@@ -169,6 +169,14 @@ public class NoPlayablePlayer : Player
//Der Spieler steht gerade
else
{
+ if (currentField.placedItem != null)
+ {
+ Trap t = currentField.placedItem.GetComponent();
+ AddCoins(-3);
+ t.target.AddCoins(3);
+ Destroy(t);
+ currentField.placedItem = null;
+ }
Vector3 currentRotation = Quaternion.ToEulerAngles(transform.rotation);
currentRotation.y = -34;
transform.rotation = Quaternion.Euler(currentRotation);
diff --git a/FlufflParty/Assets/Scripts/Players/PlayablePlayer.cs b/FlufflParty/Assets/Scripts/Players/PlayablePlayer.cs
index 085975b..686d3fe 100644
--- a/FlufflParty/Assets/Scripts/Players/PlayablePlayer.cs
+++ b/FlufflParty/Assets/Scripts/Players/PlayablePlayer.cs
@@ -172,6 +172,14 @@ public class PlayablePlayer : Player
//Der Spieler steht gerade
else
{
+ if (currentField.placedItem != null)
+ {
+ Trap t = currentField.placedItem.GetComponent();
+ AddCoins(-3);
+ t.target.AddCoins(3);
+ Destroy(t);
+ currentField.placedItem = null;
+ }
Vector3 currentRotation = Quaternion.ToEulerAngles(transform.rotation);
currentRotation.y = -34;
transform.rotation = Quaternion.Euler(currentRotation);