예제 #1
0
    static int PCStatusValue(plotbase.NAtt SL, int sfx)
    {
        //{ Determine the value of this status effect. }
        int N = plotbase.NAttValue(SL, statusfx.NAG_StatusChange, sfx);

        if (N > 0)
        {
            N = (N + 9) / 10;
        }
        else if (N == -1)
        {
            N = 3;
        }

        return(N);
    }
예제 #2
0
 static void HealAllInjuries(gamebook.Scenario SC)
 {
     /* The medical terminal is going to fix everything that is */
     /* wrong with the PC. */
     rpgtext.DCGameMessage("Your injuries are treated by the medical unit.");
     SC.PC.HP = SC.PC.HPMax;
     plotbase.NAtt SFX = SC.PC.SF;
     while (SFX != null)
     {
         plotbase.NAtt SF2 = SFX.next;
         if (SFX.G == statusfx.NAG_StatusChange && SFX.S < 0)
         {
             plotbase.RemoveNAtt(ref SC.PC.SF, SFX);
         }
         SFX = SF2;
     }
     gamebook.PCStatLine(SC);
 }
예제 #3
0
 public static void UpdateStatusList(ref plotbase.NAtt SL)
 {
     //{ Scan through the status list SL. }
     //{ For each status whose value isn't -1, value gets decremented }
     //{ by one. If value has reached zero, the status change is }
     //{ removed from the list. }
     plotbase.NAtt l  = SL;
     plotbase.NAtt l2 = null;
     while (l != null)
     {
         l2 = l.next;
         if (l.V > 0)
         {
             l.V -= 1;
         }
         if (l.V == 0)
         {
             plotbase.RemoveNAtt(ref SL, l);
         }
         l = l2;
     }
 }