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 void ActorStatus_EndingTurn(object sender, StartOrEndTurnEventArgs e) { SkillComponentTag merit = SkillComponentTag.WaterMerit; SkillComponentTag flaw = SkillComponentTag.FireFlaw; if (!GetComponent <LocalManager>().MatchID(e.ObjectID)) { return; } if (HasStatus(flaw, out _)) { TryCountdownDuration(flaw); TryCountdownDuration(positiveStatus); } else if (HasStatus(merit, out _)) { TryCountdownDuration(merit); TryCountdownDuration(negativeStatus); } else { TryCountdownDuration(positiveStatus); TryCountdownDuration(negativeStatus); } PublishPCStatus(); }
private void NPCAI_StartingTurn(object sender, StartOrEndTurnEventArgs e) { if (!GetComponent <LocalManager>().MatchID(e.ObjectID)) { return; } if (GetComponent <NPCBonusAction>().HasBonusAction) { GetComponent <NPCBonusAction>().TakeBonusAction(); } ActionTag action; if (GetComponent <NPCAttack>().IsInsideRage(out int outOfRange)) { GetComponent <NPCAttack>().DealDamage(); GetComponent <NPCAttack>().Curse(); action = ActionTag.NPCAttack; } else { GetComponent <NPCMove>().Approach(outOfRange); action = ActionTag.Move; } GetComponent <LocalManager>().TakingAction(action); GetComponent <LocalManager>().TakenAction(action); GetComponent <LocalManager>().CheckingSchedule(action); }
private void PCStartEndTurn_EndingTurn(object sender, StartOrEndTurnEventArgs e) { if (!GetComponent <LocalManager>().MatchID(e.ObjectID)) { return; } }
private void NormalMode_StartingTurn(object sender, StartOrEndTurnEventArgs e) { if (e.SubTag == SubTag.PC) { GetComponent <GameModeManager>().SwitchGameMode(startTurn); } }
private void ActorStatus_StartingTurn(object sender, StartOrEndTurnEventArgs e) { if (!GetComponent <LocalManager>().MatchID(e.ObjectID)) { return; } TryRemoveStatus(); PublishPCStatus(); }
private void PCStartEndTurn_StartingTurn(object sender, StartOrEndTurnEventArgs e) { if (!GetComponent <LocalManager>().MatchID(e.ObjectID)) { return; } if (GameCore.AxeManCore.GetComponent <LogManager>().GetLog(0) != newTurn) { GameCore.AxeManCore.GetComponent <LogManager>().Add(newTurn); } }
private void AnnouncePCDeath_EndingTurn(object sender, StartOrEndTurnEventArgs e) { if (announce) { GetComponent <ColorManager>().SetColor( pcRenderer, ColorTag.Orange); GetComponent <LogManager>().Add(new LogMessage( LogCategoryTag.GameProgress, LogMessageTag.PCDeath)); announce = false; } }
private void AltarCooldown_StartingTurn(object sender, StartOrEndTurnEventArgs e) { if (e.SubTag != SubTag.PC) { return; } if (CurrentCooldown > 0) { CurrentCooldown--; CurrentCooldown = Math.Max(MinCooldown, CurrentCooldown); OnChangedAltarCooldown(EventArgs.Empty); } }
private void NPCBonusAction_StartedTurn(object sender, StartOrEndTurnEventArgs e) { SkillComponentTag flaw = SkillComponentTag.WaterFlaw; if (!GetComponent <LocalManager>().MatchID(e.ObjectID) || GetComponent <ActorStatus>().HasStatus(flaw, out _)) { return; } if (CurrentCooldown > MinCooldown) { CurrentCooldown -= decrease; } }
private void AltarColor_StartedTurn(object sender, StartOrEndTurnEventArgs e) { if (e.SubTag != SubTag.PC) { return; } if (GetComponent <AltarCooldown>().CurrentCooldown > GetComponent <AltarCooldown>().MinCooldown) { SetAltarColor(ColorTag.Grey); } else { SetAltarColor(ColorTag.White); } }
private void ActiveTrap_EndingTurn(object sender, StartOrEndTurnEventArgs e) { if (!GetComponent <LocalManager>().MatchID(e.ObjectID)) { return; } while (trapTags.Count > 0) { BuildingEffect building = GameCore.AxeManCore.GetComponent <BuildingEffect>(); MainTag mainTag = MainTag.Trap; SubTag subTag = trapTags.Pop(); SkillComponentTag skill = building.GetEffect(mainTag, subTag); int data = building.GetPowerDuration(mainTag, subTag); GetComponent <ActorStatus>().AddStatus(skill, new EffectData(data, data)); AddLog(subTag); } }
private void ProgressBar_EndingTurn(object sender, StartOrEndTurnEventArgs e) { if (e.SubTag != SubTag.PC) { return; } SpriteRenderer sr; currentX = GetXCoordinate(currentX, minX, maxX); for (int i = 0; i < bars.Length; i++) { sr = bars[i].GetComponent <SpriteRenderer>(); if (i < currentX) { GetComponent <ColorManager>().SetColor(sr, ColorTag.Grey); } else { GetComponent <ColorManager>().SetColor(sr, ColorTag.Black); } } }