Example #1
0
 public override void Apply(BattleUnit source, BattleUnit target)
 {
     target.AddEffect(new DamagingOverTime(source, target, value1, Element.Wind, (int)value2));
 }
 public override void CopyTo(BattleUnit target, float modifier = 1.0f)
 {
     target.AddEffect(new DamagingOverTime(Source, target, valueReceived * modifier, element, Duration), true);
 }
Example #3
0
 public override void CopyTo(BattleUnit target, float modifier = 1.0f)
 {
     target.AddEffect(new DefenseDown(Source, target, valueReceived * modifier, Duration), true);
 }
 public List <BattleUnit> GetTeam(BattleUnit battleUnit, bool countDead = false, bool deadOnly = false)
 {
     return(GetTeam(GetUnitType(battleUnit.unit), countDead, deadOnly));
 }
Example #5
0
 public override void Apply(BattleUnit source, BattleUnit target)
 {
     target.TakeDamage(source.curDmg, value1, DamageType.Physical, (Element)(Mathf.Clamp((int)value2, 1, (int)Element.Neutral)), source);
 }
 public override void Apply(BattleUnit source, BattleUnit target)
 {
     target.actionPoints -= Mathf.FloorToInt(value1);
     target.actionPoints -= Mathf.FloorToInt(value2 * target.curSpeed);
     BattleManager.instance.queue.Sort();
 }
Example #7
0
 public override void Apply(BattleUnit source, BattleUnit target)
 {
     target.effects[Mathf.Clamp(((int)value1), 0, target.effects.Count - 1)].Amplify(value2);
 }
 public override void Apply(BattleUnit source, BattleUnit target)
 {
     target.Revive();
 }
Example #9
0
 public override void Apply(BattleUnit source, BattleUnit target) {
     if(value2 < 0)
         target.curDmg += (int)value1 * target.curDmg;
     else
         target.AddEffect(new DamageUp(source, target, value1, (int)value2));
 }
Example #10
0
 public override void CopyTo(BattleUnit target, float modifier = 1.0f)
 {
     target.AddEffect(new DrainingDamage(target, Source, multiplier * modifier, Duration), true);
 }
 public override void CopyTo(BattleUnit target, float modifier = 1.0f)
 {
     target.AddEffect(new Taunting(Source, target, aggroIncrease * modifier, Duration), true);
 }
 public void UpdateTurn()
 {
     currentUnit = queue.Dequeue();
     currentUnit.UpdateStatusEffects();
     // ShowEnemyInfo();
 }
 public List <BattleUnit> GetEnemies(BattleUnit battleUnit, bool countDead = false, bool deadOnly = false)
 {
     return(GetTeam(((battleUnit.unit.IsHero)? UnitType.Enemy : UnitType.Hero), countDead, deadOnly));
 }
Example #14
0
 public override void Apply(BattleUnit source, BattleUnit target)
 {
     target.TakeDamage(source.curDmg, -value1, DamageType.None, Element.Neutral, source);
     target.TakeDamage(target.unit.hpMax, -value2, DamageType.None, Element.Neutral, source);
 }
Example #15
0
 public override void CopyTo(BattleUnit target, float modifier = 1.0f)
 {
     target.AddEffect(new Hiding(Source, target, negativeAggro * modifier, Duration), true);
 }
 // Versao de callback das skills precisa ser responsavel por calcular o ganho de exp
 public override void Use(BattleUnit user, List <BattleUnit> targets, bool shouldOverride1 = false, float value1 = 0f, bool shouldOverride2 = false, float value2 = 0f)
 {
     targets = FilterTargets(user, targets); // Filtragem para garantir a consistencia dos callbacks de AoE
     GiveExp(targets);
     base.Use(user, targets, shouldOverride1, value1, shouldOverride2, value2);
 }
Example #17
0
 public void Remove(BattleUnit unit)
 {
     list.Remove(unit);
 }
Example #18
0
 public override void CopyTo(BattleUnit target, float modifier = 1.0f)
 {
     target.AddEffect(new StatusResistUp(Source, target, resistIncrease * modifier, Duration), true);
 }
Example #19
0
 private int CompareUnits(BattleUnit x, BattleUnit y)
 {
     return(x.actionPoints - y.actionPoints);
 }
Example #20
0
 public override void CopyTo(BattleUnit target, float modifier = 1.0f)
 {
     target.AddEffect(new Paralyzed(Source, target, rollValue * modifier, Duration), true);
 }
Example #21
0
 public override void Apply(BattleUnit source, BattleUnit target)
 {
     target.AddEffect(new Defending(target, value1, (int)value2));
 }
Example #22
0
 public override void Apply(BattleUnit source, BattleUnit target)
 {
     target.AddEffect(new Paralyzed(source, target, value1, (int)value2));
 }
Example #23
0
 public abstract void Apply(BattleUnit source, BattleUnit target);
Example #24
0
        protected List <BattleUnit> FilterTargets(BattleUnit source, List <BattleUnit> oldList)
        {
            List <BattleUnit> newList = new List <BattleUnit>(oldList);
            List <BattleUnit> allies  = BattleManager.instance.GetTeam(source);

            foreach (BattleUnit unit in oldList)
            {
                switch (target)
                {
                case TargetType.Null:
                case TargetType.Self:
                    if (unit != source)
                    {
                        newList.Remove(unit);
                    }
                    break;

                case TargetType.DeadAlly:
                case TargetType.DeadAllies:
                    if (!(allies.Contains(unit) && unit.CurHP <= 0))
                    {
                        newList.Remove(unit);
                    }
                    break;

                case TargetType.SingleAlly:
                case TargetType.MultiAlly:
                    if (!(allies.Contains(unit) && unit.CurHP > 0))
                    {
                        newList.Remove(unit);
                    }
                    break;

                case TargetType.AllAllies:
                    if (!allies.Contains(unit))
                    {
                        newList.Remove(unit);
                    }
                    break;

                case TargetType.DeadEnemy:
                case TargetType.DeadEnemies:
                    if (allies.Contains(unit) || unit.CurHP > 0)
                    {
                        newList.Remove(unit);
                    }
                    break;

                case TargetType.SingleEnemy:
                case TargetType.MultiEnemy:
                    if (allies.Contains(unit) || unit.CurHP <= 0)
                    {
                        newList.Remove(unit);
                    }
                    break;

                case TargetType.AllEnemies:
                    if (allies.Contains(unit))
                    {
                        newList.Remove(unit);
                    }
                    break;
                }
            }
            return(newList);
        }
 public void Revive(BattleUnit unit)
 {
     queue.Enqueue(unit, 0);
     unitsUI.ReinsertUnit(unit);
 }