public StatModificationEffect(int statID, STATMODIFIERTYPE statModifierType, int amountToModify, int ID) : base(ID)
 {
     this.statID           = statID;
     statType              = (STATTYPE)statID;
     this.amountToModify   = amountToModify;
     this.statModifierType = statModifierType;
 }
 public StatIResultData(int statID, STATAMOUNTTYPE statAmountType, IOcuppy ocuppy)
 {
     this.statID         = statID;
     statType            = (STATTYPE)statID;
     this.statAmountType = statAmountType;
     this.ocuppy         = ocuppy;
     resultDataType      = RESULTDATATYPE.STAT;
 }
 public Stat(int actualStatValue, int maxStatValue, int ID, STATTYPE statType)
 {
     this.ActualStatValue = actualStatValue;
     this.MaxStatValue    = maxStatValue;
     this.id            = ID;
     this.StatType      = statType;
     unitsModifiersList = new List <StatModification>();
 }
Exemple #4
0
    public int getStat(STATTYPE t)
    {
        switch (t)
        {
        case STATTYPE.STR:
            return(STR);

        case STATTYPE.INT:
            return(INT);

        case STATTYPE.DEX:
            return(DEX);

        case STATTYPE.VIT:
            return(VIT);

        case STATTYPE.CHP:
            return(currentHP);

        case STATTYPE.HP:
            return(HP);

        case STATTYPE.CMP:
            return(currentMP);

        case STATTYPE.MP:
            return(MP);

        case STATTYPE.PATK:
            return(PATK);

        case STATTYPE.PDEF:
            return(PDEF);

        case STATTYPE.CRIT:
            return(CRIT);

        case STATTYPE.MATK:
            return(MATK);

        case STATTYPE.MDEF:
            return(MDEF);

        case STATTYPE.CRITDMG:
            return(CRITDMG);

        case STATTYPE.SPD:
            return(SPD);

        default:
            return(-5);
        }
    }
Exemple #5
0
    public void fncAdjStat(float amount, STATTYPE getSTAT)
    {
        switch (getSTAT)
        {
        case STATTYPE.HUNGER:
            catHunger += amount;
            if (catHunger < 0)
            {
                fncSetStat(0, STATTYPE.HUNGER);
            }
            break;

        case STATTYPE.MORALE:
            catMorale += amount;
            if (catHunger < 0)
            {
                fncSetStat(0, STATTYPE.MORALE);
            }
            break;

        case STATTYPE.ENERGY:
            catEnergy += amount;
            if (catHunger < 0)
            {
                fncSetStat(0, STATTYPE.ENERGY);
            }
            break;

        case STATTYPE.HEALTH:
            catHealth += amount;
            if (catHunger < 0)
            {
                fncSetStat(0, STATTYPE.HEALTH);
            }
            break;

        case STATTYPE.TOILET:
            catToilet += amount;
            if (catHunger < 0)
            {
                fncSetStat(0, STATTYPE.TOILET);
            }
            break;

        default: break;
        }
    }
Exemple #6
0
    public void fncSetStat(float amount, STATTYPE getSTAT)
    {
        switch (getSTAT)
        {
        case STATTYPE.HUNGER: catHunger = amount; break;

        case STATTYPE.MORALE: catMorale = amount; break;

        case STATTYPE.ENERGY: catEnergy = amount; break;

        case STATTYPE.HEALTH: catHealth = amount; break;

        case STATTYPE.TOILET: catToilet = amount; break;

        default: break;
        }
    }
        public bool IsValidStat(IOcuppy ocuppy)
        {
            STATTYPE statType = (STATTYPE)statID;

            return(ocuppy.Stats.ContainsKey(statType));
        }