本文整理匯總了C#中Sanguosha.Core.Players.Player.LoseAdditionalSkill方法的典型用法代碼示例。如果您正苦於以下問題:C# Player.LoseAdditionalSkill方法的具體用法?C# Player.LoseAdditionalSkill怎麽用?C# Player.LoseAdditionalSkill使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Sanguosha.Core.Players.Player
的用法示例。
在下文中一共展示了Player.LoseAdditionalSkill方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: UninstallTriggers
protected override void UninstallTriggers(Player owner)
{
foreach (var sk in theSkill)
{
owner.LoseAdditionalSkill(sk);
}
}
示例2: 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<OptionPrompt> hsOptions = new List<OptionPrompt>();
foreach (var sk in handler.Hero.Skills)
{
if (sk.IsAwakening || sk.IsRulerOnly || sk.IsSingleUse) continue;
skills.Add(sk);
hsOptions.Add(new OptionPrompt("HuaShen", sk));
}
int skanswer;
Game.CurrentGame.UiProxies[Owner].AskForMultipleChoice(new MultipleChoicePrompt("HuaShen"), hsOptions, out skanswer);
acquiredSkill = skills[skanswer];
Game.CurrentGame.PlayerAcquireSkill(Owner, 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.HandleGodHero(Owner);
Game.CurrentGame.Emit(GameEvent.PlayerChangedAllegiance, new GameEventArgs() { Source = Owner });
return;
}
示例3: PlayerLoseSkill
public void PlayerLoseSkill(Player p, ISkill skill, bool undeletable = false)
{
if (!undeletable && !p.AdditionalSkills.Contains(skill)) return;
p.LoseAdditionalSkill(skill, undeletable);
SkillSetChangedEventArgs args = new SkillSetChangedEventArgs();
args.Source = p;
args.Skills.Add(skill);
args.IsLosingSkill = true;
Emit(GameEvent.PlayerSkillSetChanged, args);
_ResetCards(p);
}
示例4: PlayerLoseSkill
public void PlayerLoseSkill(Player p, ISkill skill, bool undeletable = false)
{
p.LoseAdditionalSkill(skill, undeletable);
GameEventArgs args = new GameEventArgs();
args.Source = p;
Game.CurrentGame.Emit(GameEvent.PlayerSkillSetChanged, args);
_ResetCards(p);
}
示例5: PlayerLostSkill
public void PlayerLostSkill(Player p, ISkill skill)
{
p.LoseAdditionalSkill(skill);
_ResetCards(p);
}