Пример #1
0
    public void randomizeEdge()
    {
        int index = Random.Range(0, 6);

        if (dice.getEdgeByIndex(index).isEdgeSpecial())
        {
            currentSpecialEdge = (SpecialEdgeSO)dice.getEdgeByIndex(index);
            capture.text       = currentSpecialEdge.getDescription();
            if (currentSpecialEdge.getNumberOfBlockedDices() > 0)
            {
                roundController.blockDices(currentSpecialEdge.getNumberOfBlockedDices());
            }
            if (currentSpecialEdge.isPassiveEdge() && !currentSpecialEdge.isRandomValues())
            {
                roundController.applyPassiveModificator("DMG", currentSpecialEdge.getPassiveDamage());
                roundController.applyPassiveModificator("DEF", currentSpecialEdge.getPassiveDefense());
                roundController.applyPassiveModificator("HEAL", currentSpecialEdge.getPassiveHeal());
                roundController.applyPassiveModificator("Reroll", currentSpecialEdge.getExtraRerolls());
            }
            if (currentSpecialEdge.isPassiveEdge() && currentSpecialEdge.isRandomValues())
            {
                roundController.applyPassiveModificator("DMG", Random.Range(currentSpecialEdge.getRandomDamageMin(), currentSpecialEdge.getRandomDamageMax() + 1));
                roundController.applyPassiveModificator("DEF", Random.Range(currentSpecialEdge.getRandomDefenseMin(), currentSpecialEdge.getRandomDefenseMax() + 1));
                roundController.applyPassiveModificator("HEAL", Random.Range(currentSpecialEdge.getRandomHealMin(), currentSpecialEdge.getRandomHealMax() + 1));
            }
            currentEdge = null;
        }
        else
        {
            currentEdge        = dice.getEdgeByIndex(index);
            capture.text       = "DMG " + currentEdge.getDamage() + "\nDEF " + currentEdge.getDefense() + "\nHEAL " + currentEdge.getHeal();
            currentSpecialEdge = null;
        }
    }
Пример #2
0
 public void setSpecialCurrentEdge(SpecialEdgeSO newEdge)
 {
     currentSpecialEdge = newEdge;
     capture.text       = currentSpecialEdge.getDescription();
 }