Exemple #1
0
        private SummonToForm AugmentTemplate(SummonToForm st)
        {
            st.PCCasterLevel = Convert.ToInt32(nudCasterLevel.Value);
            var list = lvAugments.CheckedItems.Cast <object>().Select(x => x.ToString()).ToList();

            if (list.Any(x => x.Contains("Feat: Spell Focus (Conjuration)")))
            {
                st = Augments.Feats.SpellFocusConjuration(st);
            }
            if (list.Any(x => x.Contains("Feat: Augment Summoning")))
            {
                st = Augments.Feats.AugmentSummoning(st);
            }
            if (list.Any(x => x.Contains("Feat: Greenbound Summoning")))
            {
                st = Augments.Feats.GreenboundSummoning.Augment(st);
            }
            if (list.Any(x => x.Contains("Item: Obad-Hai's Green Man")))
            {
                st = Augments.Items.ObadHaisGreenMan(st);
            }

            st.Rounds = st.PCCasterLevel * (int.TryParse(nudDurationMultiplier.Value.ToString(), out int durationMult) ? durationMult : 1);
            return(st);
        }
Exemple #2
0
 private bool HasWeaponFinesse(SummonToForm st)
 {
     for (int i = 0; i < st.Feats.Count; i++)
     {
         if (st.Feats[i].Contains("WeaponFinesse"))
         {
             return(true);
         }
     }
     return(false);
 }
Exemple #3
0
 private void BtnLoad_Click(object sender, EventArgs e)
 {
     if (tvTemplates.SelectedNode != null)
     {
         if (tvTemplates.SelectedNode.Tag is Summon selSumm)
         {
             SummonToForm st = new SummonToForm(selSumm);
             st = AugmentTemplate(st);
             Summoned sc = new Summoned(st);
             sc.Show();
         }
     }
     ClearSummonPage();
 }
Exemple #4
0
                public static SummonToForm Augment(SummonToForm st)
                {
                    st.Type   = string.Format("Plant (Augmented {0})", st.Type);
                    st.HitDie = 8;

                    st.NaturalArmor += 6;

                    st.Attacks.Add(new Attack(1, "GB Slam", SlamDamage(st.Size).ToString()));

                    st.SpecAtks.Add("Entangle");
                    st.SpecAtks.Add("Pass without Trace");
                    st.SpecAtks.Add("Speak with Plants");
                    st.SpecAtks.Add("Wall of Thorns (1/day)");

                    st.SpecQual.Add("DR 10/magic and slashing.");
                    st.SpecQual.Add("Fast Healing (Ex): +3/round");
                    st.SpecQual.Add("Natural weapons → magic weapons");
                    st.SpecQual.Add("Grapple Bonus (Ex): +4");
                    st.MiscGrapple += 4;
                    st.SpecQual.Add("Resist Cold and Electricity (Ex): +10");
                    st.SpecQual.Add("Tremorsense");

                    st.Abilities.Str += 6;
                    st.Abilities.Dex += 2;
                    st.Abilities.Con += 4;
                    st.Abilities.Cha += 4;

                    st.Environment = "Any forests";

                    int hideIndex = st.Skills.FindIndex(x => x.Skill == Skill.Hide);
                    int msIndex   = st.Skills.FindIndex(x => x.Skill == Skill.MoveSilently);

                    if (hideIndex > -1)
                    {
                        st.Skills[hideIndex].Asterisk = true;
                    }
                    if (msIndex > -1)
                    {
                        st.Skills[msIndex].Asterisk = true;
                    }

                    st.Notes.Add("Hide +16 (RB) (forest)");
                    st.Notes.Add("Move Silently +16 (RB) (forest)");
                    st.Notes.Add("Natural weapons treated as magic weapons for overcoming dmg reduction.");
                    st.Notes.Add("Tremorsense(EX): Auto sense anything w/in 60' in contact with the ground.");
                    return(st);
                }
Exemple #5
0
        private void StatsChanged(SummonToForm st)
        {
            st.Abilities.Str = Convert.ToInt32(nudSTR.Value);
            st.Abilities.Dex = Convert.ToInt32(nudDEX.Value);
            st.Abilities.Con = Convert.ToInt32(nudCON.Value);
            st.Abilities.Int = Convert.ToInt32(nudINT.Value);
            st.Abilities.Wis = Convert.ToInt32(nudWIS.Value);
            st.Abilities.Cha = Convert.ToInt32(nudCHA.Value);

            st.Size = Enum.GetValues(typeof(Size)).Cast <Size>().ToList().Find(x => x.ToString() == cbSize.SelectedItem.ToString());

            for (int i = 0; i < st.Attacks.Count; i++)
            {
                Attack thisAttack = st.Attacks[i];
                if (thisAttack.Name == "GB Slam")
                {
                    thisAttack.Extra = Augments.Feats.GreenboundSummoning.SlamDamage(st.Size);
                }
            }

            LoadPage(st);
        }
Exemple #6
0
        private int GetToughnessHP(SummonToForm st)
        {
            int toughnessHP = 0;

            for (int i = 0; i < st.Feats.Count; i++)
            {
                if (st.Feats[i].Contains("Toughness"))
                {
                    string toughness = Regex.Match(st.Feats[i], @"\(([^)]+)\)").Value;
                    if (toughness == "")
                    {
                        toughnessHP = 3;
                    }
                    else
                    {
                        toughnessHP = 3 * Convert.ToInt32(toughness.Replace("(", "").Replace(")", ""));
                    }
                }
            }

            return(toughnessHP);
        }
Exemple #7
0
 public static SummonToForm ObadHaisGreenMan(SummonToForm st)
 {
     st.PCCasterLevel += 2;
     return(st);
 }
Exemple #8
0
 public static SummonToForm AugmentSummoning(SummonToForm st)
 {
     st.Abilities.Str += 4;
     st.Abilities.Con += 4;
     return(st);
 }
Exemple #9
0
 public static SummonToForm SpellFocusConjuration(SummonToForm st)
 {
     st.PCCasterLevel++;
     return(st);
 }
Exemple #10
0
        private void LoadPage(SummonToForm st)
        {
            flag1 = true;
            rtbNotes.Clear();
            lbAttacks.Items.Clear();
            lbFeats.Items.Clear();
            lbAttacks.Items.Clear();
            lbFullAttacks.Items.Clear();
            lbSkills.Items.Clear();
            lbSpecialAttacks.Items.Clear();
            lbSpecialQualities.Items.Clear();


            for (int i = 0; i < st.Skills.Count; i++)
            {
                lbSkills.Items.Add(Summon.CorrectSkillModForward(st.Skills[i], st.Abilities));
            }

            for (int i = 0; i < st.Feats.Count; i++)
            {
                lbFeats.Items.Add(st.Feats[i]);
            }

            for (int i = 0; i < st.SpecAtks.Count; i++)
            {
                lbSpecialAttacks.Items.Add(st.SpecAtks[i]);
            }

            for (int i = 0; i < st.SpecQual.Count; i++)
            {
                lbSpecialQualities.Items.Add(st.SpecQual[i]);
            }

            for (int i = 0; i < st.Attacks.Count; i++)
            {
                lbAttacks.Items.Add(st.Attacks[i]);
            }

            for (int i = 0; i < st.FullAttacks.Count; i++)
            {
                lbFullAttacks.Items.Add(st.FullAttacks[i].ToString());
            }

            rtbNotes.AppendText(string.Join("\r", st.Notes));

            tbSummonName.Text = st.Name;
            nudRounds.Value   = st.Rounds;

            nudSTR.Value = st.Abilities.Str;
            nudDEX.Value = st.Abilities.Dex;
            nudCON.Value = st.Abilities.Con;
            nudINT.Value = st.Abilities.Int;
            nudWIS.Value = st.Abilities.Wis;
            nudCHA.Value = st.Abilities.Cha;

            cbSize.Text         = st.Size.ToString();
            tbType.Text         = st.Type;
            nudInitiative.Value = st.Abilities.DexMod;
            tbSpeed.Text        = st.Movement;

            labelACDex.Text     = st.Abilities.DexMod.ToString();
            labelACNatural.Text = st.NaturalArmor.ToString();
            labelACSize.Text    = Summon.GetSizeMod(st.Size).ToString();

            labelTouchDex.Text  = st.Abilities.DexMod.ToString();
            labelTouchSize.Text = Summon.GetSizeMod(st.Size).ToString();

            labelFlatNatural.Text = st.NaturalArmor.ToString();
            labelFlatSize.Text    = Summon.GetSizeMod(st.Size).ToString();

            tbSpaceReach.Text = string.Format("{0}, {1}", st.Space, st.Reach);

            labelFortBase.Text    = st.Saves.Fort.ToString();
            labelFortAbility.Text = st.Abilities.ConMod.ToString();
            nudFortMisc.Value     = st.MiscFort;

            labelRefBase.Text    = st.Saves.Ref.ToString();
            labelRefAbility.Text = st.Abilities.DexMod.ToString();
            nudRefMisc.Value     = st.MiscRef;

            labelWillBase.Text    = st.Saves.Will.ToString();
            labelWillAbility.Text = st.Abilities.WisMod.ToString();
            nudWillMisc.Value     = st.MiscWill;


            tbEnvironment.Text = st.Environment;
            tbHitDie.Text      = string.Format("{0}d{1}", st.Level, st.HitDie);

            int toughnessAddition = GetToughnessHP(st);

            int prevMaxHP = int.Parse(nudMaxHP.Value.ToString());
            int newMaxHP  = int.Parse(Math.Floor(st.Level * 1.000 * Math.Ceiling(st.HitDie * 1.000 / 2) + st.Level * .500 + st.Abilities.ConMod * 1.000 * st.Level + toughnessAddition).ToString());

            nudMaxHP.Value = decimal.Parse(newMaxHP.ToString());
            //new summon
            if (prevMaxHP == 0)
            {
                nudCurrentHP.Value = newMaxHP;
            }
            //nothing changed; regular update
            else if (prevMaxHP == newMaxHP)
            {
            }
            //CON changed
            else
            {
                int difference = prevMaxHP - currentST.CurrentHP;
                nudCurrentHP.Value = newMaxHP - difference;
            }

            labelBaseAttackBonus.Text = st.BAB.ToString();

            //nudGrappleBonus.Value =
            labelGrappleBase.Text    = st.BAB.ToString();
            labelGrappleAbility.Text = st.Abilities.StrMod.ToString();
            labelGrappleSize.Text    = Summon.GetGrappleSizeMod(st.Size).ToString();
            nudGrappleMisc.Value     = st.MiscGrapple;

            //nudMeleeBonus.Value =
            labelMeleeBase.Text    = labelBaseAttackBonus.Text;
            labelMeleeAbility.Text = (HasWeaponFinesse(st) ? Math.Max(st.Abilities.StrMod, st.Abilities.DexMod) : st.Abilities.StrMod).ToString();
            labelMeleeSize.Text    = Summon.GetSizeMod(st.Size).ToString();
            nudMeleeMisc.Value     = st.MiscMelee;

            //nudRangeBonus.Value =
            labelRangeBase.Text    = labelBaseAttackBonus.Text;
            labelRangeAbility.Text = st.Abilities.DexMod.ToString();
            labelRangeSize.Text    = Summon.GetSizeMod(st.Size).ToString();
            nudRangeMisc.Value     = st.MiscRange;
            flag1 = false;
        }
Exemple #11
0
 public Summoned(SummonToForm st)
 {
     currentST = st;
     InitializeComponent();
     LoadPage(currentST);
 }