本文整理汇总了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);
}
示例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);
}
}
}
}
}
示例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);
}
示例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);
}
示例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;
}
示例6: PlayerAcquireSkill
public void PlayerAcquireSkill(Player p, ISkill skill)
{
p.AcquireAdditionalSkill(skill);
_ResetCards(p);
}