private void SkillCooldown_StartedTurn(object sender, StartOrEndTurnEventArgs e) { ActorStatus actorStatus = GetComponent <ActorStatus>(); SkillComponentTag flaw = SkillComponentTag.WaterFlaw; SkillComponentTag merit = SkillComponentTag.FireMerit; int decrease; int cooldown; if (!GetComponent <LocalManager>().MatchID(e.ObjectID) || actorStatus.HasStatus(flaw, out _)) { return; } if (actorStatus.HasStatus(merit, out _)) { decrease = fastDecrease; } else { decrease = normalDecrease; } foreach (SkillNameTag snt in currentCDDict.Keys.ToArray()) { if (currentCDDict[snt] > MinCooldown) { cooldown = currentCDDict[snt] - decrease; cooldown = Math.Max(MinCooldown, cooldown); SetCurrentCooldown(snt, cooldown); } } }
private int StatusMod() { int increase = 0; int decrease = 0; ActorStatus actorStatus = GetComponent <ActorStatus>(); EffectData effectData; if (actorStatus.HasStatus(SkillComponentTag.AirMerit, out effectData)) { increase = effectData.Power; } if (actorStatus.HasStatus(SkillComponentTag.EarthFlaw, out effectData)) { decrease = effectData.Power; } return(increase - decrease); }
private void PCStatus() { int index = 0; foreach (SkillComponentTag sct in orderedComponents) { if (actorStatus.HasStatus(sct, out EffectData effectData)) { SearchText(orderedStatusName[index]).text = skillManager.GetSkillComponentName(sct); SearchText(orderedStatusData[index]).text = skillManager.GetSkillEffectName(sct, effectData); index++; } } }