LoseAdditionalSkill() public méthode

public LoseAdditionalSkill ( ISkill skill, bool undeletable = false ) : void
skill ISkill
undeletable bool
Résultat void
Exemple #1
0
 protected override void UninstallTriggers(Player owner)
 {
     foreach (var sk in theSkill)
     {
         owner.LoseAdditionalSkill(sk);
     }
 }
Exemple #2
0
 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;
 }
Exemple #3
0
 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);
 }
Exemple #4
0
 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);
 }
Exemple #5
0
 public void PlayerLostSkill(Player p, ISkill skill)
 {
     p.LoseAdditionalSkill(skill);
     _ResetCards(p);
 }