So, for the first time in the project, I will have to surrender, step back for a while, train with some other, smaller games and hopefully come back at a later point when I am better, as I feel like I can’t put more time into this without feeling I am not progressing at all. Hopefully I will be able to finish this in the future but for now I guess I just can’t.
For whatever reason, the Debugs only are activated when plaing in the Unity Game View, not in the Standalone, and whatever I do that stupid Text is not updated for both Client and Server, only for one.
As it doesn’t cost me anything, Ill just add the full code here, can’t hurt and mabye in a different dimension it helps someone with something (or someone is super bored) 
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using Photon.Pun;
public class Unit : MonoBehaviour
{
public AudioSource source;
public AudioClip goal;
public AudioClip move;
public GameObject victoryPanel;
public Animator animator;
public bool selected;
GameMaster gm;
public Text kingHealth;
public bool isKing;
public int tileSpeed;
public bool hasMoved;
public float moveSpeed;
public int playerNumber;
public int attackRange;
List<Unit> enemiesInRange = new List<Unit>();
public bool hasAttacked;
public GameObject weaponIcon;
public int health;
public int attackDamage;
public int defenseDamage;
public int armor;
private Animator camAnim;
public GameObject deathEffect;
public DamageIcon damageIcon;
SpriteRenderer sprite;
GameObject obj;
PhotonView view;
private void Start()
{
source = GetComponent<AudioSource>();
animator = GetComponent<Animator>();
gm = FindObjectOfType<GameMaster>();
camAnim = Camera.main.GetComponent<Animator>();
UpdateKingHealth();
sprite = GetComponent<SpriteRenderer>();
obj = GameObject.FindGameObjectWithTag("GameMaster");
view = GetComponent<PhotonView>();
}
public void UpdateTheHealthOfKing()
{
PhotonView photonView = PhotonView.Get(this);
photonView.RPC("UpdateKingHealth", RpcTarget.All);
}
[PunRPC]
void UpdateKingHealth()
{
if (isKing == true)
{
kingHealth.text = health.ToString();
}
}
private void OnMouseOver()
{
if (Input.GetMouseButtonDown(1))
{
gm.ToggleStatsPanel(this);
}
}
private void OnMouseDown()
{
ResetWeaponIcons();
if (selected == true)
{
selected = false;
gm.selectedUnit = null;
gm.ResetTiles();
}
else
{
if (playerNumber == gm.playerTurn)
{
if (gm.selectedUnit != null)
{
gm.selectedUnit.selected = false;
}
selected = true;
gm.selectedUnit = this;
gm.ResetTiles();
GetEnemies();
GetWalkableTiles();
}
}
Collider2D col = Physics2D.OverlapCircle(Camera.main.ScreenToWorldPoint(Input.mousePosition), 0.15f);
Unit unit = col.GetComponent<Unit>();
if (gm.selectedUnit != null)
{
if (gm.selectedUnit.enemiesInRange.Contains(unit) && gm.selectedUnit.hasAttacked == false)
{
gm.selectedUnit.Attack(unit);
}
}
}
public void Attack(Unit enemy)
{
animator.SetTrigger("Attack");
camAnim.SetTrigger("Shake");
hasAttacked = true;
if (hasAttacked == true)
{
hasMoved = true;
gm.ResetTiles();
sprite.color = new Color(1, 0, 0, 1);
}
int enemyDamage = attackDamage - enemy.armor;
int myDamage = enemy.defenseDamage - armor;
if (enemyDamage >= 1)
{
DamageIcon instance = Instantiate(damageIcon, enemy.transform.position, Quaternion.identity);
instance.Setup(enemyDamage);
enemy.health -= enemyDamage;
Debug.Log("oisdjf");
enemy.UpdateTheHealthOfKing();
}
if (transform.tag == "Archer" && enemy.tag != "Archer")
{
if (Mathf.Abs(transform.position.x - enemy.transform.position.x) + Mathf.Abs(transform.position.y - enemy.transform.position.y) <= 1)
{
if (myDamage >= 1)
{
DamageIcon instance = Instantiate(damageIcon, transform.position, Quaternion.identity);
instance.Setup(myDamage);
health -= myDamage;
Debug.Log("oisdjf");
UpdateTheHealthOfKing();
}
}
}
else
{
if (myDamage >= 1)
{
DamageIcon instance = Instantiate(damageIcon, transform.position, Quaternion.identity);
instance.Setup(myDamage);
health -= myDamage;
Debug.Log("oisdjf");
UpdateTheHealthOfKing();
}
}
if (enemy.health <= 0)
{
Instantiate(deathEffect, enemy.transform.position, Quaternion.identity);
Destroy(enemy.gameObject);
GetWalkableTiles();
gm.RemoveStatsPanel(enemy);
if (enemy.isKing == true)
{
enemy.victoryPanel.SetActive(true);
Time.timeScale = 0f;
}
}
if (health <= 0)
{
Instantiate(deathEffect, transform.position, Quaternion.identity);
gm.ResetTiles();
gm.RemoveStatsPanel(this);
}
gm.UpdateStatsPanel();
obj.GetComponent<GameMaster>().currentTime -= 10;
}
void GetWalkableTiles()
{
if (hasMoved == true)
{
return;
}
foreach (Tile tile in FindObjectsOfType<Tile>())
{
if (Mathf.Abs(transform.position.x - tile.transform.position.x) + Mathf.Abs(transform.position.y - tile.transform.position.y) <= tileSpeed)
{
if (tile.IsClear() == true)
{
tile.Highlight();
}
}
}
}
public void GetEnemies()
{
enemiesInRange.Clear();
foreach (Unit unit in FindObjectsOfType<Unit>())
{
if (Mathf.Abs(transform.position.x - unit.transform.position.x) + Mathf.Abs(transform.position.y - unit.transform.position.y) <= attackRange)
{
if (unit.playerNumber != gm.playerTurn && hasAttacked == false)
{
enemiesInRange.Add(unit);
unit.weaponIcon.SetActive(true);
}
}
}
}
public void ResetWeaponIcons()
{
foreach (Unit unit in FindObjectsOfType<Unit>())
{
unit.weaponIcon.SetActive(false);
}
}
public void ResetUnitColors()
{
foreach (Unit unit in FindObjectsOfType<Unit>())
{
sprite.color = new Color(255, 255, 255, 255);
}
}
public void Move(Vector2 tilePos)
{
animator.SetBool("Speed", true);
gm.ResetTiles();
StartCoroutine(StartMovement(tilePos));
obj.GetComponent<GameMaster>().currentTime -= 10;
}
IEnumerator StartMovement(Vector2 tilePos)
{
source.clip = move;
source.Play();
while (transform.position.x != tilePos.x)
{
transform.position = Vector2.MoveTowards(transform.position, new Vector2(tilePos.x, transform.position.y), moveSpeed * Time.deltaTime);
yield return null;
}
source.Stop();
while (transform.position.y != tilePos.y)
{
transform.position = Vector2.MoveTowards(transform.position, new Vector2(transform.position.x, tilePos.y), moveSpeed * Time.deltaTime);
yield return null;
}
hasMoved = true;
sprite.color = new Color(1, 0, 0, 1);
ResetWeaponIcons();
GetEnemies();
gm.MoveStatsPanel(this);
animator.SetBool("Speed", false);
}
}