当前位置: 首页>>代码示例>>C#>>正文


C# Player.AcquireAdditionalSkill方法代码示例

本文整理汇总了C#中Sanguosha.Core.Players.Player.AcquireAdditionalSkill方法的典型用法代码示例。如果您正苦于以下问题:C# Player.AcquireAdditionalSkill方法的具体用法?C# Player.AcquireAdditionalSkill怎么用?C# Player.AcquireAdditionalSkill使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Sanguosha.Core.Players.Player的用法示例。


在下文中一共展示了Player.AcquireAdditionalSkill方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Run

 void Run(Player Owner, GameEvent gameEvent, GameEventArgs eventArgs)
 {
     Game.CurrentGame.RegisterTrigger(GameEvent.PlayerJudgeDone, new GetJudgeCardTrigger(Owner) { Priority = int.MinValue });
     var result = Game.CurrentGame.Judge(Owner, this);
     ISkill skill = new ShuangXiongCardTransformSkill(result.SuitColor);
     Owner.AcquireAdditionalSkill(skill);
     Game.CurrentGame.RegisterTrigger(GameEvent.PhasePostEnd, new TriggerRemoval(Owner, skill));
     Game.CurrentGame.CurrentPhaseEventIndex++;
     throw new TriggerResultException(TriggerResult.End);
 }
开发者ID:maplegh,项目名称:sgs,代码行数:10,代码来源:ShuangXiong.cs

示例2: InstallTriggers

 protected override void InstallTriggers(Player owner)
 {
     theSkill = new List<ISkill>();
     foreach (var p in Game.CurrentGame.AlivePlayers)
     {
         if (p.Role == Role.Ruler)
         {
             foreach (var sk in p.Hero.Skills)
             {
                 if (sk.IsRulerOnly)
                 {
                     var toAdd = Activator.CreateInstance(sk.GetType()) as ISkill;
                     owner.AcquireAdditionalSkill(toAdd);
                     theSkill.Add(toAdd);
                 }
             }
         }
     }
 }
开发者ID:maplegh,项目名称:sgs,代码行数:19,代码来源:WeiDi.cs

示例3: PlayerAcquireSkill

 public void PlayerAcquireSkill(Player p, ISkill skill, bool undeletable = false)
 {
     if (p.IsDead) return;
     p.AcquireAdditionalSkill(skill, undeletable);
     SkillSetChangedEventArgs args = new SkillSetChangedEventArgs();
     args.Source = p;
     args.Skills.Add(skill);
     args.IsLosingSkill = false;
     Emit(GameEvent.PlayerSkillSetChanged, args);
     _ResetCards(p);
 }
开发者ID:h1398123,项目名称:sgs,代码行数:11,代码来源:Game.Procedures.cs

示例4: PlayerAcquireSkill

 public void PlayerAcquireSkill(Player p, ISkill skill, bool undeletable = false)
 {
     p.AcquireAdditionalSkill(skill, undeletable);
     GameEventArgs args = new GameEventArgs();
     args.Source = p;
     Game.CurrentGame.Emit(GameEvent.PlayerSkillSetChanged, args);
     _ResetCards(p);
 }
开发者ID:pxoylngx,项目名称:sgs,代码行数:8,代码来源:Game.Procedures.cs

示例5: Run

 void Run(Player Owner, GameEvent gameEvent, GameEventArgs eventArgs)
 {
     if (acquiredSkill != null)
         Owner.LoseAdditionalSkill(acquiredSkill);
     List<List<Card>> answer;
     if (!Game.CurrentGame.UiProxies[Owner].AskForCardChoice(
         new CardChoicePrompt("HuaShen"),
         new List<DeckPlace>() { new DeckPlace(Owner, HuaShenDeck) },
         new List<string>() { "HuaShen" },
         new List<int>() { 1 },
         new RequireOneCardChoiceVerifier(),
         out answer))
     {
         Trace.TraceInformation("Invalid answer, choosing for you");
         answer = new List<List<Card>>();
         answer.Add(new List<Card>());
         answer[0].Add(Game.CurrentGame.Decks[Owner, HuaShenDeck][0]);
     }
     Game.CurrentGame.SyncImmutableCardAll(answer[0][0]);
     Trace.Assert(answer[0][0].Type is HeroCardHandler);
     var handler = answer[0][0].Type as HeroCardHandler;
     List<ISkill> skills = new List<ISkill>();
     List<string> hsOptions = new List<string>();
     foreach (var sk in handler.Hero.Skills)
     {
         if (sk.IsAwakening || sk.IsRulerOnly || sk.IsSingleUse) continue;
         skills.Add(sk);
         hsOptions.Add(string.Format("Skill.{0}.Name", sk.GetType().Name));
     }
     int skanswer;
     Game.CurrentGame.UiProxies[Owner].AskForMultipleChoice(new MultipleChoicePrompt("HuaShen"), hsOptions, out skanswer);
     acquiredSkill = skills[skanswer];
     Owner.AcquireAdditionalSkill(acquiredSkill);
     Owner.Allegiance = handler.Hero.Allegiance;
     Owner.IsMale = handler.Hero.IsMale;
     Owner.IsFemale = !handler.Hero.IsMale;
     Game.CurrentGame.NotificationProxy.NotifyImpersonation(Owner, handler.Hero, acquiredSkill);
     Game.CurrentGame.Emit(GameEvent.PlayerChangedAllegiance, new GameEventArgs() { Source = Owner });
     return;
 }
开发者ID:maplegh,项目名称:sgs,代码行数:40,代码来源:HuaShen.cs

示例6: PlayerAcquireSkill

 public void PlayerAcquireSkill(Player p, ISkill skill)
 {
     p.AcquireAdditionalSkill(skill);
     _ResetCards(p);
 }
开发者ID:maplegh,项目名称:sgs,代码行数:5,代码来源:Game.Procedures.cs


注:本文中的Sanguosha.Core.Players.Player.AcquireAdditionalSkill方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。