示例#1
0
文件: Player.cs 项目: sjai013/RPG
 public void removeStatusEffect(StatusEffectType statusEffectType)
 {
     switch (statusEffectType.status)
     {
         case StatusEffectType.StatusTypes.Raise:
             break;
         case StatusEffectType.StatusTypes.Poison:
             break;
         case StatusEffectType.StatusTypes.Haste:
             break;
         case StatusEffectType.StatusTypes.Slow:
             break;
         case StatusEffectType.StatusTypes.Curse:
             break;
         case StatusEffectType.StatusTypes.Death:
             break;
         case StatusEffectType.StatusTypes.Regen:
             break;
         case StatusEffectType.StatusTypes.Wait:
             playerStats.offenseDamageMultiplier = playerStats.offenseDamageMultiplier / statusEffectType.calculateEffect();
             break;
         default:
             break;
     }
 }
示例#2
0
文件: Player.cs 项目: sjai013/RPG
    public void applyStatusEffect(StatusEffectType statusEffectType)
    {
        switch (statusEffectType.status)
        {
            case StatusEffectType.StatusTypes.Wait:
                addStock();
                playerStats.offenseDamageMultiplier = playerStats.offenseDamageMultiplier * statusEffectType.calculateEffect();
                break;

            case StatusEffectType.StatusTypes.Raise:
                playerStats.dead = false;
                playerStats.curHP = 1;

                Damage damage = new Damage(-(int)(statusEffectType.potency * playerStats.maxHP), false);
                damage.actualDamage = damage.baseDamage;
                this.takeDamage(damage, false, 0.0f);
                break;

        }

        // Apply status effect for each unique type of status effect type
    }