Пример #1
0
    public void Fusion(int actionSlimeId, int targetSlimeId)
    {
        RawSlime actionSlime       = FindSlimeById(actionSlimeId);
        RawSlime fusionTargetSlime = FindSlimeById(targetSlimeId);

        fusionTargetSlime.SetMass(actionSlime.GetMass() + fusionTargetSlime.GetMass());
        fusionTargetSlime.GetPlayer().RemoveSlime(actionSlime);

        SpendActions(1);
    }
Пример #2
0
    public void Attack(int actionSlimeId, int targetSlimeId)
    {
        RawSlime actionSlime = FindSlimeById(actionSlimeId);
        RawSlime targetSlime = FindSlimeById(targetSlimeId);

        int damage = actionSlime.getDamage;

        if (actionSlime.changeMass((int)-actionSlime.GetMass() * actionSlime.attackDrain) <= 0)
        {
            actionSlime.GetPlayer().RemoveSlime(actionSlime);
        }
        if (targetSlime.changeMass((int)-damage * targetSlime.GetDamageReduction()) <= 0)
        {
            targetSlime.GetPlayer().RemoveSlime(targetSlime);

            /*Debug.Log("DEAD");
             * Debug.Log(targetSlime.GetPlayer());*/
        }

        SpendActions(1);
    }