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); }
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)); }
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(); }
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(); }
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)); }
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)); }
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); }
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); }
public void Remove(BattleUnit unit) { list.Remove(unit); }
public override void CopyTo(BattleUnit target, float modifier = 1.0f) { target.AddEffect(new StatusResistUp(Source, target, resistIncrease * modifier, Duration), true); }
private int CompareUnits(BattleUnit x, BattleUnit y) { return(x.actionPoints - y.actionPoints); }
public override void CopyTo(BattleUnit target, float modifier = 1.0f) { target.AddEffect(new Paralyzed(Source, target, rollValue * modifier, Duration), true); }
public override void Apply(BattleUnit source, BattleUnit target) { target.AddEffect(new Defending(target, value1, (int)value2)); }
public override void Apply(BattleUnit source, BattleUnit target) { target.AddEffect(new Paralyzed(source, target, value1, (int)value2)); }
public abstract void Apply(BattleUnit source, BattleUnit target);
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); }