Exemple #1
0
 public void LogStats()
 {
     Debug.Log("HP: " + hp.GetValue());
     Debug.Log("MANA: " + mana.GetValue());
     Debug.Log("PHYSICAL: " + physical.GetValue());
     Debug.Log("SPECIAL: " + special.GetValue());
     Debug.Log("DEFENSE: " + defence.GetValue());
     Debug.Log("RESISTANCE: " + resistance.GetValue());
     Debug.Log("SPEED: " + speed.GetValue());
 }
Exemple #2
0
    // Resetter ------------------//
    public void ResetStats()
    {
        foreach (KeyValuePair <ModifiableStat, PlayerStatWithModifiers> statPair in this.modifiableStats)
        {
            PlayerStatWithModifiers stat = statPair.Value;
            stat.ClearModifiers();
            stat.GetValue();
        }

        this.SetHPMPToMax();
    }
    public override void ApplyTo(Fighter p)
    {
        this.playerStat = p.stats.GetStat(stat);

        //TODO: Possible Animation Modifications
        switch (type)
        {
        case Type.PERCENTAGE:
            _flatChange       = (int)Mathf.Ceil(playerStat.GetValue() * modifier);
            this.statModifier = playerStat.ApplyDeltaModifier(_flatChange, StatModifier.Type.FLAT);
            break;

        case Type.FLAT:
            _flatChange       = (int)modifier;
            this.statModifier = playerStat.ApplyDeltaModifier(_flatChange, StatModifier.Type.ADD_PERCENTAGE);
            break;
        }
        Debug.Log("Defending: " + _flatChange + " damage");
    }