public override List <TriggerStruct> Triggerable(TriggerEvent triggerEvent, Room room, Player player, ref object data) { List <TriggerStruct> triggers = new List <TriggerStruct>(); if (triggerEvent == TriggerEvent.EventPhaseStart && player.Phase == Player.PlayerPhase.Finish && base.Triggerable(player, room) && !player.IsKongcheng() && ShefuVS.GuhuoCards(room, player).Count > 0) { triggers.Add(new TriggerStruct(Name, player)); } else if (triggerEvent == TriggerEvent.CardUsed && data is CardUseStruct use && use.Card != null && use.To.Count > 0 && use.IsHandcard) { FunctionCard fcard = Engine.GetFunctionCard(use.Card.Name); if (fcard is SkillCard) { return(triggers); } List <Player> chengyus = RoomLogic.FindPlayersBySkillName(room, Name); string card_name = fcard.Name; if (fcard is Slash) { card_name = Slash.ClassName; } foreach (Player p in chengyus) { if (p != player && p.Phase == Player.PlayerPhase.NotActive && p.ContainsTag(string.Format("shefu_{0}", card_name)) && p.GetTag(string.Format("shefu_{0}", card_name)) is int id && p.GetPile("ambush").Contains(id)) { triggers.Add(new TriggerStruct(Name, p)); } } }
public Shefu() : base("shefu") { events = new List <TriggerEvent> { TriggerEvent.CardUsed, TriggerEvent.EventPhaseStart, TriggerEvent.JinkEffect }; view_as_skill = new ShefuVS(); skill_type = SkillType.Wizzard; }