Beispiel #1
0
        private void MonsterLogList_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            MonsterTagFlyout.ShowAt(this);
            MonsterTag mTag = (MonsterTag)(sender as GridView).SelectedItem;

            if (mTag != null)
            {
                string mName = mTag.CreatureName;

                monsterCardFlyout.MonsterName  = mName;
                monsterCardFlyout.SizeTypeStat = ((App)Application.Current).CheckBeastSizeType(mName);
                monsterCardFlyout.ACStat       = ((App)Application.Current).CheckBeastAC(mName);
                monsterCardFlyout.HPStat       = ((App)Application.Current).CheckBeastHP(mName);
                monsterCardFlyout.SPStat       = ((App)Application.Current).CheckBeastSpeed(mName);

                monsterCardFlyout.ACStat = monsterCardFlyout.ACStat.Replace(" (", "\r(");
                monsterCardFlyout.SPStat = monsterCardFlyout.SPStat.Replace(',', '\r');
                monsterCardFlyout.SPStat = monsterCardFlyout.SPStat.Replace(" (", "\r(");
                monsterCardFlyout.HPStat = monsterCardFlyout.HPStat.Replace(' ', '\r');

                monsterCardFlyout.StrengthStat     = GetAbilityScore(((App)Application.Current).CheckBeastSTR(mName));
                monsterCardFlyout.ConstitutionStat = GetAbilityScore(((App)Application.Current).CheckBeastCON(mName));
                monsterCardFlyout.DextarityStat    = GetAbilityScore(((App)Application.Current).CheckBeastDEX(mName));
                monsterCardFlyout.IntelligenceStat = GetAbilityScore(((App)Application.Current).CheckBeastINT(mName));
                monsterCardFlyout.WisdomStat       = GetAbilityScore(((App)Application.Current).CheckBeastWIS(mName));
                monsterCardFlyout.CharismaStat     = GetAbilityScore(((App)Application.Current).CheckBeastCHA(mName));

                FillDetailsList(mName);

                monsterCardFlyout.Alignment = mTag.Alignment;
            }
        }
Beispiel #2
0
 public void FillLog(ref ObservableCollection <MonsterTag> monsterLogList)
 {
     foreach (Logs.MonsterInfo mInfo in Bestiary.monsterDictionary)
     {
         //Need to parse that challenge rating so it sorts correctly
         MonsterTag mTag = new MonsterTag()
         {
             CreatureName = mInfo.name, Alignment = mInfo.alignment, ChallengeRating = mInfo.tagList[2]
         };
         monsterLogList.Add(mTag);
     }
 }
Beispiel #3
0
        private void GrabSortedChallengeRationCollection(float maxRange = 30.0f, float minrange = 0.0f)
        {
            currectSortedCollection.Clear();
            for (int i = MonsterLogList.Items.Count - 1; i >= 0; i--)
            {
                MonsterTag mCR = (MonsterTag)MonsterLogList.Items[i];
                float      cr  = mCR.FloatChallengeRating;

                if (cr >= minrange && cr <= maxRange)
                {
                    currectSortedCollection.Add(mCR);
                }
            }

            ResetCardFlyout();
            MonsterLogList.ItemsSource = currectSortedCollection;
        }