/*
    ============================================================================
    Condition functions
    ============================================================================
    */
    public void ApplyCondition(Combatant c)
    {
        if(DataHolder.BattleSystem().IsActiveTime())
        {
            c.timeBar = this.timebar;
            if(c.timeBar > DataHolder.BattleSystem().maxTimebar)
            {
                c.timeBar = DataHolder.BattleSystem().maxTimebar;
            }
        }

        for(int i=0; i<this.setStatus.Length; i++)
        {
            if(this.setStatus[i])
            {
                c.status[i].SetValue(this.status[i], true, false, false);
            }
        }

        for(int i=0; i<this.effect.Length; i++)
        {
            if(SkillEffect.ADD.Equals(this.effect[i]))
            {
                c.AddEffect(i, c);
            }
            else if(SkillEffect.REMOVE.Equals(this.effect[i]))
            {
                c.RemoveEffect(i);
            }
        }
    }
Exemple #2
0
 /*
 ============================================================================
 Utility functions
 ============================================================================
 */
 public void ApplyEffects(Combatant user, Combatant target)
 {
     for(int i=0; i<this.skillEffect.Length; i++)
     {
         if(SkillEffect.ADD.Equals(this.skillEffect[i]))
         {
             target.AddEffect(i, user);
         }
         else if(SkillEffect.REMOVE.Equals(this.skillEffect[i]))
         {
             target.RemoveEffect(i);
         }
     }
 }
Exemple #3
0
 public void StopEffect(Combatant target)
 {
     target.RemoveEffect(this);
     this.CheckEndEffectChanges(target);
 }
Exemple #4
0
 public void CheckEndEffectChanges(Combatant target)
 {
     for(int i=0; i<this.effectChangeID.Length; i++)
     {
         if(SkillEffect.ADD.Equals(this.endEffectChanges[i]))
         {
             target.AddEffect(this.effectChangeID[i], target);
         }
         else if(SkillEffect.REMOVE.Equals(this.endEffectChanges[i]))
         {
             target.RemoveEffect(this.effectChangeID[i]);
         }
     }
 }
Exemple #5
0
 public void CheckAutoRemove(Combatant c)
 {
     if(this.CheckRequirements(c, this.autoRemove, this.removeRequirement, this.removeNeeded))
     {
         c.RemoveEffect(this.realID);
     }
 }