コード例 #1
0
ファイル: RacialTraits.cs プロジェクト: Shemamforash/Crucible
 public void Purge()     //Nereides function to produce elation
 {
     while (MasterScript.playerTurnScript.knowledge >= 100 && MasterScript.playerTurnScript.power >= 100)
     {
         MasterScript.playerTurnScript.knowledge -= 100;
         MasterScript.playerTurnScript.power     -= 100;
         StackOfElation newStack = new StackOfElation();
         newStack.creationTime = Time.time;
         newStack.maxAge       = 60f;
         elationStacks.Add(newStack);
         ++stacksGeneratedSinceLastUpdate;
         ++stackWealthBonus;
     }
 }
コード例 #2
0
    private void TN2I3()
    {
        if (checkValue == false)
        {
            for (int i = 0; i < systemSIMData.secondaryResourceGeneratedSinceLastUpdate; ++i)
            {
                int rnd = Random.Range(0, 3);

                if (rnd == 0)
                {
                    StackOfElation newStack = new StackOfElation();
                    newStack.creationTime = Time.time;
                    newStack.maxAge       = 60f;
                    MasterScript.racialTraitScript.elationStacks.Add(newStack);
                    ++MasterScript.racialTraitScript.stacksGeneratedSinceLastUpdate;
                    ++MasterScript.racialTraitScript.stackWealthBonus;
                }
            }

            improvements.listOfImprovements[47].improvementMessage = "25% Chance to Generate Elation on Secondary Resource Generation";
        }
    }