Esempio n. 1
0
    private void OnBeforeRenderNextTurn(WidgetButton nextTurn)
    {
        var disabled = !GameSystems.Party.IsPlayerControlled(GameSystems.D20.Initiative.CurrentActor) ||
                       uiCombat_10C040B0;

        nextTurn.SetDisabled(disabled);
    }
Esempio n. 2
0
    private void RerollStats()
    {
        // Ironman does not allow re-rolling stats
        if (!Globals.GameLib.IsIronmanGame || _pkt.numRerolls == 0)
        {
            _pkt.numRerolls++;
            if (_pkt.numRerolls == 100000)
            {
                for (var i = 0; i < 6; i++)
                {
                    _pkt.abilityStats[i]  = -1;
                    charGenRolledStats[i] = 18;
                }

                _pkt.rerollString = "@1#{pc_creation:10002}";
            }
            else if (_pkt.numRerolls > 100000)
            {
                for (var i = 0; i < 6; i++)
                {
                    _pkt.abilityStats[i]  = -1;
                    charGenRolledStats[i] = 3;
                }

                _pkt.rerollString = "@1#{pc_creation:10003}";
            }
            else
            {
                if (Globals.GameLib.IsIronmanGame)
                {
                    _rerollButton.SetDisabled(true);
                    RollIronmanStats();
                }
                else
                {
                    _pkt.rerollString = $"@0#{{pc_creation:10001}}@1 {_pkt.numRerolls:D5}";
                    RollStats();
                }

                OnAbilityScoresChanged();
            }
        }
    }