Example #1
0
    public void FormatDevice(GameObject d)
    {
        if (isBusy)
        {
            throw new DeviceException("Device is busy");
        }

        if (d == null)
        {
            return;
        }

        Device target = d.GetComponent <Device> ();

        if (target == null)
        {
            return;
        }

        if (!CheckMarks(target, 3))
        {
            return;
        }

        int pool = GetAttribute("Computer") + GetAttribute("Logic");

        GameManager.RollResult attack = GameManager.instance.Roll(pool, GetAttribute("Sleaze"), false);
        Debug.LogFormat("Attack pool: {0}\tSuccesses: {1}", pool, attack.successes);

        pool = target.GetAttribute("Firewall") + target.GetAttribute("Willpower");
        GameManager.RollResult defense = GameManager.instance.Roll(pool, pool, false);
        Debug.LogFormat("Defense pool: {0}\tSuccesses: {1}", pool, defense.successes);

        _overwatchScore += defense.successes;

        if (attack.successes > defense.successes)
        {
            target.FormatSelf();
        }
        else
        {
            Debug.Log("Format Device failed!");
        }
    }
Example #2
0
    public int CheckOverwatchScore()
    {
        if (isBusy)
        {
            throw new DeviceException("Device is busy");
        }

        GameManager.RollResult roll      = GameManager.instance.Roll(GetAttribute("Electronic Warfare") + GetAttribute("Logic"), GetAttribute("Sleaze"), false);
        GameManager.RollResult threshold = GameManager.instance.Roll(6, 6, false);

        if (roll.successes > threshold.successes)
        {
            return(_overwatchScore);
        }
        else
        {
            return(0);
        }
    }
Example #3
0
 public void FixFormattedDeviceStep(Device d)
 {
     GameManager.RollResult roll = GameManager.instance.Roll(GetAttribute("Software") + GetAttribute("Logic"), GetLimit("Mental"), false);
     d.FormatStep(roll.successes);
 }