public EffectResult SetStatus(ConditionID conditionId) { //Check current status if (Status != null) { return(EffectResult.AlreadyOne); } //Check invulnerability //Poison if (conditionId == ConditionID.psn && (Base.Type1 == PokemonType.Poison || Base.Type2 == PokemonType.Poison)) { return(EffectResult.Inmune); } //Burn if (conditionId == ConditionID.brn && (Base.Type1 == PokemonType.Fire || Base.Type2 == PokemonType.Fire)) { return(EffectResult.Inmune); } //TODO: En el futuro quiza habria que add la resistencia de los tipo planta a ciertos ataques(drenadoras, somnifero, etc) Status = ConditionsDB.Conditions[conditionId]; Status?.OnStart?.Invoke(this); StatusChanges.Enqueue($"{Base.Name} {Status.StartMessage}"); OnStatusChanged?.Invoke(); return(EffectResult.Succes); }
public void SetVolatileStatus(ConditionID conditionId) { if (VolatileStatus != null) { return; } VolatileStatus = ConditionsDB.Conditions[conditionId]; VolatileStatus?.OnStart?.Invoke(this); StatusChanges.Enqueue($"{Base.Name} {VolatileStatus.StartMessage}"); }
public void SetVolatileStatus(ConditionID conditionId) { if (VolatileStatus != null) { return; //si ya tiene un estado alterado no puede poner otro } //TODO: tal y como esta hecho ahora no puede tener mas de un status volatile, esto no es correcto VolatileStatus = ConditionsDB.Conditions[conditionId]; VolatileStatus?.OnStart?.Invoke(this); StatusChanges.Enqueue($"{Base.Name} {VolatileStatus.StartMessage}"); }
public void SetStatus(ConditionID conditionID) { if (Status != null) { return; } Status = ConditionsDB.Conditions[conditionID]; Status?.OnStart?.Invoke(this); StatusChanges.Enqueue($"{MonsterBase.Name} {Status.StartMessage}"); OnStatusChanged?.Invoke(); }
public void SetStatus(ConditionID conditionId) { if (Status != null) { return; } Status = ConditionsDB.Conditions[conditionId]; Status?.OnStart?.Invoke(this); StatusChanges.Enqueue($"{_baseTeras.Name} {Status.StatMessage}!"); OnStatusChange?.Invoke(); }
public void ApplyBoosts(List <StatBoost> statBoosts) { foreach (var statBoost in statBoosts) { var stat = statBoost.stat; var boost = statBoost.boost; StatBoosts[stat] = Mathf.Clamp(StatBoosts[stat] + boost, -6, 6); if (boost > 0) { StatusChanges.Enqueue($"{Base.Name}'s {stat} increased!"); } else { StatusChanges.Enqueue($"{Base.Name}'s {stat} decreased!"); } } }
public void ApplyBoost(List <StatBoost> statBoosts) { foreach (var statboost in statBoosts) { var stat = statboost.stat; var boost = statboost.boost; BoostStats[stat] = BoostStats[stat] + boost; BoostStats[stat] = Mathf.Clamp(BoostStats[stat] + boost, -6, 6); if (boost > 0) { StatusChanges.Enqueue($"{_baseTeras.Name}'s {stat} rose!"); } else { StatusChanges.Enqueue($"{_baseTeras.Name}'s {stat} fell!"); } } }
public void ApplyStatBoosts(List <StatBoost> statBoosts) { foreach (StatBoost statBoost in statBoosts) { Stat stat = statBoost.stat; int boost = statBoost.boost; // If you want to change the -6 or 6, you must also change "boostValues" in the GetStat method StatBoosts[stat] = Mathf.Clamp(StatBoosts[stat] + boost, -6, 6); if (boost > 0) { StatusChanges.Enqueue($"{MonsterBase.Name}'s {stat} rose!"); } else { StatusChanges.Enqueue($"{MonsterBase.Name}'s {stat} fell!"); } } }
public void ApplyBoosts(List <StatBoost> statBoosts) { foreach (var statBoost in statBoosts) { var stat = statBoost.stat; var boost = statBoost.boost; StatBoosts[stat] = Mathf.Clamp(StatBoosts[stat] + boost, -6, 6); if (boost > 0) { StatusChanges.Enqueue($"{Base.Name}'s {stat} rose!"); } else { StatusChanges.Enqueue($"{Base.Name}'s {stat} fell!"); } Debug.Log($"{stat} has been boosted to {StatBoosts[stat]}"); } }
public void ApplyBoosts(List <StatBoost> statBoosts)//esta funcion se utiliza cuando recibes un ataque que baja o sube las estadisticas, el paramtro es la estadistica a modificar { foreach (var statBoost in statBoosts) { var stat = statBoost.stat; var boost = statBoost.boost; StatBoosts[stat] = Mathf.Clamp(StatBoosts[stat] + boost, -6, 6); if (boost > 0) { StatusChanges.Enqueue($"{Base.Name}`s {stat} rose!"); } else { StatusChanges.Enqueue($"{Base.Name}`s {stat} fell!"); } //Debug.Log($"{stat} has been boosted to {StatBoosts[stat]}"); } }
public void SetStatus(ConditionID conditionID) { status = ConditionsDB.Conditions[conditionID]; StatusChanges.Enqueue($"{basePokemon.name} {status.StartMessage}"); }
public void SetStatus(ConditionID conditionID) { Status = ConditionDB.Conditions[conditionID]; StatusChanges.Enqueue($"{Base.Name} {Status.StartMessage}"); }
// F e a t u r e s private void ChangeStatus(UpdateInstallerStatus newStatus) { StatusChanges?.Invoke(this, new UpdateInstallerStatusChangedEventArgs(newStatus)); }