コード例 #1
0
 /// <summary>
 /// Pulls a search card from the search deck
 /// </summary>
 /// <param name="searchingHero">Hero that performed the search</param>
 /// <param name="act">Current act of the game, used only when the treasure chest is found</param>
 public void pullSearchCard(HeroSheet searchingHero)
 {
     discardDeck.Add(cardDeck[0]);
     discardDeck[0].Active = true;
     if (!(cardDeck[0].Name == "Nothing"))
     {
         searchingHero.PickedClass.AddSearchCard(cardDeck[0]);
     }
     cardDeck.RemoveAt(0);
 }
コード例 #2
0
 public Card pullShopCard(HeroSheet currHero)
 {
     if (cardDeck.Count > 0)
     {
         Card tempCard = cardDeck[0];
         cardDeck.RemoveAt(0);
         return(tempCard);
     }
     else
     {
         return(null);
     }
 }
コード例 #3
0
ファイル: Deck.cs プロジェクト: Rostaen/c-sharp-project
 public Card pullShopCard(HeroSheet currHero)
 {
     if (cardDeck.Count > 0)
     {
         Card tempCard = cardDeck[0];
         cardDeck.RemoveAt(0);
         return tempCard;
     }
     else return null;
 }
コード例 #4
0
ファイル: Deck.cs プロジェクト: Rostaen/c-sharp-project
 /// <summary>
 /// Pulls a search card from the search deck
 /// </summary>
 /// <param name="searchingHero">Hero that performed the search</param>
 /// <param name="act">Current act of the game, used only when the treasure chest is found</param>
 public void pullSearchCard(HeroSheet searchingHero)
 {
     discardDeck.Add(cardDeck[0]);
     discardDeck[0].Active = true;
     if (!(cardDeck[0].Name == "Nothing")) { searchingHero.PickedClass.AddSearchCard(cardDeck[0]); }
     cardDeck.RemoveAt(0);
 }
コード例 #5
0
ファイル: Game1.cs プロジェクト: Rostaen/c-sharp-project
 /// <summary>
 /// Checks to see the remaining action points for the current hero
 /// </summary>
 /// <param name="heroSheet">The number of remaining points</param>
 private void checkActionPoints(HeroSheet heroSheet)
 {
     if (heroSheet.PickedClass.ClassName == "necromancer" && heroSheet.ActionPoints == 2 && familiarActive) { currentHeroState = HeroState.RefreshCards; choosingAction = true; }
     else
     {
         choosingAction = true; usedSkillOnce = false;
         currentHeroActionState = HeroActionState.ChooseAction;
         totalAttack = 0; totalDefense = 0; totalRange = 0; totalSurge = 0;
         if (heroSheet.ActionPoints != 0) { currentHeroState = HeroState.SelectActions; }
         else
         {
             // Checks to see if the hero used a Rest Action at any time
             if (heroSheet.Resting) changeHpStaminaBar(heroTokens[heroNumPosition], heroSheet.MaxStam, heroNumPosition, "stamina");
             // Checks if the current class is Necromancer and if the reanimate did not act yet
             if (!familiarActed && heroSheet.PickedClass.ClassName == "necromancer") currentHeroState = HeroState.FamiliarActions;
             else { ResetFamiliar(); currentHeroTurn++; currentHeroState = HeroState.EndTurn; }
         }
     }
 }
コード例 #6
0
ファイル: Game1.cs プロジェクト: Rostaen/c-sharp-project
 /// <summary>
 /// Awards a shop card to a hero when a specific number of kills have been made
 /// </summary>
 /// <param name="hero">The hero being awarded the gear</param>
 private void AwardShopCard(HeroSheet hero)
 {
     awardingLoot = true;
     messages.Clear();
     messages.Add(new Message("You have been awarded treasure!", windlassFont23, centerWindowMessage));
     messages.Add(new Message("Choose only one item as your reward.", windlassFont14, new Vector2 (centerWindowMessage.X, centerWindowMessage.Y + 30)));
     for (int x = 0; x < masterKillCount; x++)
     {
         Rectangle drawRect;
         if (currentAct == 1) awardedShopCards.Add(shop1Deck.pullShopCard(hero));
         else awardedShopCards.Add(shop2Deck.pullShopCard(hero));
         if(x < 5) drawRect =  new Rectangle(creationRec.X + 50 + (x * 138), creationRec.Y + 200, 128, 192);
         else drawRect = new Rectangle(creationRec.X + 50 + ((x - 5) * 138), creationRec.Y + 402, 128, 192);
         awardedShopCards[awardedShopCards.Count - 1].DrawRectangle = drawRect;
     }
 }
コード例 #7
0
ファイル: Game1.cs プロジェクト: Rostaen/c-sharp-project
 /// <summary>
 /// Determines what surges are available for the current hero to use
 /// </summary>
 /// <param name="equipment">Weapon being used with surge options</param>
 /// <param name="heroSheet">Used to determine if specific hero sheets are active for extra surge uses</param>
 /// <param name="heroToken">The hero token using the surge</param>
 private void addSurgeUsage(Equipment equipment, HeroSheet heroSheet, Token heroToken)
 {
     surgeList.Add("Restore 1 Stamina");
     if (heroSheet.MaxHP != heroToken.HP) foreach (Token hToken in heroTokens) if (hToken.Name == "Avric") { int avricRange = DetermineDistanceLong(heroToken, hToken); if (avricRange <= 3) surgeList.Add("Restore 1 Damage"); }
     if (heroSheet.PickedClass.ClassName == "runemaster") surgeList.Add("Suffer 1 Stamina to\ngain +2 Damage");
     string surge1 = equipment.Surge1, surge2 = equipment.Surge2, surge3 = equipment.Surge3;
     surgeList.Add(surge1 = GetSurgeName(surge1));
     if (surge2 != "") surgeList.Add(surge2 = GetSurgeName(surge2));
     if (surge3 != "") surgeList.Add(surge3 = GetSurgeName(surge3));
     for (int x = 0; x < surgeList.Count; x++)
         surgeListRect.Add(new Token(actionChoiceRect, x + 1, (int)(GameConstants.ACTION_MESSAGE_X_LEFT) - 35, (int)(GameConstants.ACTION_TOKEN_Y_START + (GameConstants.ACTION_TOKEN_Y_BUFFER * x) + 11), new Rectangle(0, 884, 250, 23)));
 }