private void PCTeleportSelf_TakingAction(object sender, PublishActionEventArgs e) { if (e.SubTag != SubTag.PC) { return; } SkillNameTag skillName = GetComponent <PCSkillManager>() .GetSkillNameTag(e.Action); SkillTypeTag skillType = GetComponent <PCSkillManager>() .GetSkillTypeTag(skillName); if (skillType != SkillTypeTag.Move) { return; } int[] source = GetComponent <MetaInfo>().Position; int[] target = targetPosition; GetComponent <LocalManager>().SetPosition(target); GameCore.AxeManCore.GetComponent <TileOverlay>().TryHideTile(source); GameCore.AxeManCore.GetComponent <TileOverlay>().TryHideTile(target); GameCore.AxeManCore.GetComponent <LogManager>().Add( new LogMessage(LogCategoryTag.Combat, LogMessageTag.PCTeleport)); }
private void PCBuffSelf_TakingAction(object sender, PublishActionEventArgs e) { if (e.SubTag != SubTag.PC) { return; } SkillNameTag skillName = GetComponent <PCSkillManager>() .GetSkillNameTag(e.Action); SkillTypeTag skillType = GetComponent <PCSkillManager>() .GetSkillTypeTag(skillName); if (skillType != SkillTypeTag.Buff) { return; } Dictionary <SkillComponentTag, EffectData> compInt = GetComponent <PCSkillManager>().GetSkillEffect(skillName); foreach (SkillComponentTag sct in buffComps) { if (compInt.ContainsKey(sct)) { GetComponent <ActorStatus>().AddStatus(sct, compInt[sct]); } } GameCore.AxeManCore.GetComponent <LogManager>().Add( new LogMessage(LogCategoryTag.Combat, LogMessageTag.PCBuff)); }
private void Canvas_World_TakenAction(object sender, PublishActionEventArgs e) { // Only responds to move action from aim or examine marker. if (e.Action != ActionTag.Move) { return; } if ((e.SubTag != SubTag.AimMarker) && (e.SubTag != SubTag.ExamineMarker)) { return; } switch (e.SubTag) { case SubTag.AimMarker: SearchText(UITag.Modeline).text = AimModeText(); break; case SubTag.ExamineMarker: SearchText(UITag.Modeline).text = ExamineModeText(); break; default: break; } }
private void ApplySkillFlawEffect_TakenAction(object sender, PublishActionEventArgs e) { if (e.SubTag != SubTag.PC) { return; } SkillNameTag skillName = GetComponent <PCSkillManager>().GetSkillNameTag(e.Action); if (skillName == SkillNameTag.INVALID) { return; } Dictionary <SkillComponentTag, EffectData> compInt = GetComponent <PCSkillManager>().GetSkillEffect(skillName); foreach (SkillComponentTag sct in skillComps) { if (compInt.ContainsKey(sct)) { GetComponent <ActorStatus>().AddStatus(sct, compInt[sct]); } } }
private void AltarCooldown_TakenAction(object sender, PublishActionEventArgs e) { if ((e.SubTag != SubTag.PC) || (e.Action != ActionTag.ActiveAltar)) { return; } CurrentCooldown = MaxCooldown; OnChangedAltarCooldown(EventArgs.Empty); }
private void TurnManager_CheckingSchedule(object sender, PublishActionEventArgs e) { if (!GetComponent <Schedule>().Current .GetComponent <LocalManager>().MatchID(e.ObjectID)) { return; } if (endingTurnActions.Contains(e.Action)) { NextActor(); } }
private void SkillCooldown_TakenAction(object sender, PublishActionEventArgs e) { if (!GetComponent <LocalManager>().MatchID(e.ObjectID) || !IsValidAction(e.Action)) { return; } SkillNameTag skill = GetComponent <PCSkillManager>() .GetSkillNameTag(e.Action); SetCurrentCooldown(skill, GetMaxCooldown(skill)); }
private void Canvas_ExamineMode_TakenAction(object sender, PublishActionEventArgs e) { if (e.Action != ActionTag.Move) { return; } if ((e.SubTag != SubTag.AimMarker) && (e.SubTag != SubTag.ExamineMarker)) { return; } ClearText(); PrintExamineText(e.SubTag); }
private void ActiveTrap_TakenAction(object sender, PublishActionEventArgs e) { if (!GetComponent <LocalManager>().MatchID(e.ObjectID) || !validActions.Contains(e.Action)) { return; } int[] pos = GetComponent <MetaInfo>().Position; GameCore.AxeManCore.GetComponent <SearchObject>().Search( pos[0], pos[1], MainTag.Trap, out traps); foreach (GameObject go in traps) { trapTags.Push(go.GetComponent <MetaInfo>().SubTag); go.GetComponent <LocalManager>().Remove(); } }
private void PCAttackTarget_TakingAction(object sender, PublishActionEventArgs e) { if (e.SubTag != SubTag.PC) { return; } SkillNameTag skillName = GetComponent <PCSkillManager>() .GetSkillNameTag(e.Action); SkillTypeTag skillType = GetComponent <PCSkillManager>() .GetSkillTypeTag(skillName); if (skillType != SkillTypeTag.Attack) { return; } if (!GameCore.AxeManCore.GetComponent <SearchObject>() .Search(targetPosition[0], targetPosition[1], MainTag.Actor, out GameObject[] targets))