Example #1
0
        private void btCreate_Click(object sender, EventArgs e)
        {
            Function.SoundManager.PlayButtonSound();
            if (textBoxCharacterName.Text != "" && GeneralFunctions.CheckTextForNonLetters(textBoxCharacterName.Text))
            {
                if (!this.player.ControlledCharacters.Any(x => x.UnitName.ToLower().Equals(textBoxCharacterName.Text.ToLower())))
                {
                    returnedCharacter = new Core.Units.Character(textBoxCharacterName.Text, 1, 10, 10, finalclass, 0, 1, 1, 1, 1, 0, 0, null);
                    returnedCharacter.CharGear = GiveCharGear(returnedCharacter);
                    returnedCharacter.AddActiveAbility(new Core.Abilities.MeleeAttack(returnedCharacter, "", "", null, EnumAbilityClassReq.ANY));
                    returnedCharacter.AddPassiveAbility(new Core.Abilities.MeleeAttack(returnedCharacter, "", "", null, EnumAbilityClassReq.ANY));

                    this.DialogResult = System.Windows.Forms.DialogResult.OK;
                    this.Close();
                }
                else
                {
                    RPG.UI.MessageForm mes = new RPG.UI.MessageForm("You already have a character with that name!");
                    mes.ShowDialog();
                }
            }
            else if (textBoxCharacterName.Text != "")
            {
                RPG.UI.MessageForm mes = new RPG.UI.MessageForm("Please only use Letters for you Character Name");
                mes.ShowDialog();
            }
            else
            {
                RPG.UI.MessageForm mes = new RPG.UI.MessageForm("Please choose a suitable name!");
                mes.ShowDialog();
            }
        }
Example #2
0
 public Ascended(Character _char, string _name, string _description, Image _icon, EnumAbilityClassReq _classReq)
     : base(_char, _name, _description, _icon, _classReq)
 {
     this.AbilityName = "Ascended";
     this.Description = _char.UnitName + " has had all its stats, including health and attack, increased by 15!";
     this.Icon = this.Icon = this.SetIcon(Properties.Resources.meleeattack);
 }
Example #3
0
 public Ability(Character _char, string _abilityName, string _description, Image _icon, EnumAbilityClassReq _classRep)
 {
     this.abilityName = _abilityName;
     this.description = _description;
     this.SetIcon(_icon);
     this.classReq = _classRep;
 }
Example #4
0
 public Aligned(Character _char, string _name, string _description, Image _icon, EnumAbilityClassReq _classReq)
     : base(_char, _name, _description, _icon, _classReq)
 {
     int agiBuff = (int)(_char.BuffedAgility.IntValue * 0.2);
     int intBuff = (int)(_char.BuffedIntellingence.IntValue * 0.2);
     this.AbilityName = "Aligned";
     this.Description = _char.UnitName  +" is Aligned and has " + agiBuff + " more Agility and " + intBuff + " more Intellect!";
     this.Icon = this.Icon = this.SetIcon(Properties.Resources.meleeattack);
 }
Example #5
0
        public Balanced(Character _char, string _name, string _description, Image _icon, EnumAbilityClassReq _classReq)
            : base(_char, _name, _description, _icon, _classReq)
        {
            string highest = "Agility";
            string lowest = "Intellect";
            int highbuff = _char.BuffedAgility.IntValue;
            int lowbuff = _char.BuffedIntellingence.IntValue;

            if (_char.BuffedIntellingence.IntValue > _char.BuffedAgility.IntValue)
            {
                highest = "Intellect";
                lowest = "Agility";
                highbuff = _char.BuffedIntellingence.IntValue;
                lowbuff = _char.BuffedAgility.IntValue;
            }

            this.AbilityName = "Balanced";
            this.Description = _char.UnitName + " is Balanced and has " + highest + " increased by " + highbuff + " and " + lowest + " increased by " + lowbuff + "!";
            this.Icon = this.Icon = this.SetIcon(Properties.Resources.meleeattack);
        }
Example #6
0
 public Roared(Character _char, string _name, string _description, Image _icon, EnumAbilityClassReq _classReq)
     : base(_char, _name, _description, _icon, _classReq)
 {
     int buff = (int)(_char.BuffedStrength.IntValue * 0.4);
     this.AbilityName = "Roared";
     this.Description = _char.UnitName + " has Roared, increasing his Strength by " + buff + "!";
     this.Icon = this.Icon = this.SetIcon(Properties.Resources.meleeattack);
 }
Example #7
0
 public Oportunist(Character _char, string _name, string _description, Image _icon, EnumAbilityClassReq _classReq)
     : base(_char, _name, _description, _icon, _classReq)
 {
     this.AbilityName = "Oportunist";
     this.Description = _char.UnitName + " has had a random stat increased by 50%!";
     this.Icon = this.Icon = this.SetIcon(Properties.Resources.meleeattack);
 }
Example #8
0
        public Invigorated(Character _char, string _name, string _description, Image _icon, EnumAbilityClassReq _classReq)
            : base(_char, _name, _description, _icon, _classReq)
        {
            int buff = (int)(_char.BuffedAgility.IntValue * 0.2);
            string stat = "Agility";

            if (_char.BuffedAgility.IntValue < _char.BuffedIntellingence.IntValue)
            {
                buff = (int)(_char.BuffedIntellingence.IntValue * 0.2);
                stat = "Intellect";
                if (_char.BuffedIntellingence.IntValue < _char.BuffedStrength.IntValue)
                {
                    buff = (int)(_char.BuffedStrength.IntValue * 0.2);
                    stat = "Strength";
                }
            }
            else if (_char.BuffedAgility.IntValue < _char.BuffedStrength.IntValue)
            {
                buff = (int)(_char.BuffedStrength.IntValue * 0.2);
                stat = "Strength";
            }

            this.AbilityName = "Invigorated";
            this.Description = _char.UnitName + " is Invigorated and has " + buff + " more health, 20% of its " + stat + "!";
            this.Icon = this.Icon = this.SetIcon(Properties.Resources.meleeattack);
        }
Example #9
0
 public InPrayer(Character _char, string _name, string _description, Image _icon, EnumAbilityClassReq _classReq)
     : base(_char, _name, _description, _icon, _classReq)
 {
     int strBuff = (int)(_char.BuffedStrength.IntValue*0.2);
     int intBuff = (int)(_char.BuffedIntellingence.IntValue * 0.2);
     this.AbilityName = "In Prayer";
     this.Description = _char.UnitName + " is In Prayer and has " + strBuff + " increased Strength and " + intBuff + " increased Intellect!";
     this.Icon = this.Icon = this.SetIcon(Properties.Resources.meleeattack);
 }
Example #10
0
 public WarriorStrength(Character _char, string _name, string _description, Image _icon, EnumAbilityClassReq _classReq)
     : base(_char, _name, _description, _icon, _classReq)
 {
     this.AbilityName = Properties.Resources.AbilitiesTitleWarriorStrength;
     this.Description = Properties.Resources.AbilitiesDescriptionWarriorStrength;
     this.NumberOfTargets = 1;
     this.Icon = this.SetIcon(Properties.Resources.strength);
     this.TurnPointCost = 1;
     this.DamageOrHealing = EnumActiveAbilityType.Damage;
 }
Example #11
0
 public Ascend(Character _char, string _name, string _description, Image _icon, EnumAbilityClassReq _classReq)
     : base(_char, _name, _description, _icon, _classReq)
 {
     this.AbilityName = Properties.Resources.AbilitiesTitleAnyAscend;
     this.Description = Properties.Resources.AbilitiesDescriptionAnyAscend;
     this.NumberOfTargets = 1;
     this.Icon = this.SetIcon(Properties.Resources.meleeattack);
     this.TurnPointCost = 5;
     this.DamageOrHealing = EnumActiveAbilityType.Healing;
 }
Example #12
0
 public Transformed(Character _char, string _name, string _description, Image _icon, EnumAbilityClassReq _classReq)
     : base(_char, _name, _description, _icon, _classReq)
 {
     int buff = (int)(_char.BuffedIntellingence.IntValue*3);
     int debuff = (int)(_char.BuffedHP.IntValue * 0.6);
     this.AbilityName = "Transformed";
     this.Description = _char.UnitName + " is an Archon and has " + buff + " more Intellect, but " + debuff + " less maximum health!";
     this.Icon = this.Icon = this.SetIcon(Properties.Resources.meleeattack);
 }
Example #13
0
 public Brilliant(Character _char, string _name, string _description, Image _icon, EnumAbilityClassReq _classReq)
     : base(_char, _name, _description, _icon, _classReq)
 {
     int buff = (int)(_char.BuffedIntellingence.IntValue * 0.4);
     this.AbilityName = "Brilliant";
     this.Description = _char.UnitName + " is Brilliant and has " + buff + " more Intellect!";
     this.Icon = this.Icon = this.SetIcon(Properties.Resources.meleeattack);
 }
Example #14
0
        /// <summary>
        /// Return the string for a label with a character that is NOT in battle.
        /// </summary>
        /// <param name="thisChar"></param>
        /// <returns></returns>
        public static string ReturnCharInterfaceString(Character thisChar)
        {
            string temp = "";

            if (thisChar != null)
            {
                temp = "Level: " + thisChar.UnitLevel;

                if (thisChar.UnitLevel != 60)
                {
                    temp += "\nXP: " + thisChar.CharCurrentXP + "/" + thisChar.CharXPToLevel;
                }
                else
                {
                    temp += "\n";
                }

                temp += "\nHealth: " + thisChar.CurrentHP.IntValue + "/" + thisChar.BuffedHP.IntValue +
                                    "\nStrength: " + thisChar.BuffedStrength.IntValue +
                                    "\nAgility: " + thisChar.BuffedAgility.IntValue +
                                    "\nIntellect: " + thisChar.BuffedIntellingence.IntValue +
                                    "\nCrit: " + thisChar.BuffedCrit.IntValue + " (" + CombatHandler.ReturnCritPercent(thisChar.UnitLevel, thisChar.BuffedCrit.IntValue) + "%)" +
                                    "\nSpeed: " + thisChar.BuffedSpeed.IntValue + " (" + CombatHandler.ReturnSpeedPercent(thisChar.UnitLevel, thisChar.BuffedSpeed.IntValue) + "%)" +
                                    "\nAttack: " + thisChar.BuffedAttackDamage.IntValue +
                                    "\nArmor: " + thisChar.BuffedArmor.IntValue;
            }

            return temp;
        }
Example #15
0
        /// <summary>
        /// Return the appropiate image given the characters class. Also handles the case where the character is null.
        /// </summary>
        /// <param name="thisChar"></param>
        /// <returns></returns>
        public static Image ReturnImageForClass(Character thisChar)
        {
            if (thisChar != null)
            {
                switch (thisChar.CharClass)
                {
                    case RPG.Core.EnumCharClass.Warrior:
                        return Properties.Resources.warrior;

                    case RPG.Core.EnumCharClass.Paladin:
                        return Properties.Resources.paladin;

                    case RPG.Core.EnumCharClass.Wizard:
                        return Properties.Resources.wizard;

                    case RPG.Core.EnumCharClass.Thief:
                        return Properties.Resources.thief;

                    case RPG.Core.EnumCharClass.Caretaker:
                        return Properties.Resources.caretaker;

                    case RPG.Core.EnumCharClass.Synergist:
                        return Properties.Resources.synergist;

                    default:
                        return null;
                }
            }
            else
            {
                return null;
            }
        }
Example #16
0
        /// <summary>
        /// Return the string for a label with a character that IS in battle.
        /// </summary>
        /// <param name="thisChar"></param>
        /// <returns></returns>
        public static string ReturnCharBattleString(Character thisChar)
        {
            string temp = "";

            if (thisChar != null)
            {
                temp = thisChar.UnitName +
                                "\nthe " + thisChar.CharClass +
                                "\nLevel: " + thisChar.UnitLevel +
                                "\nStrength: " + thisChar.BuffedStrength.IntValue +
                                "\nAgility: " + thisChar.BuffedAgility.IntValue +
                                "\nIntellect: " + thisChar.BuffedIntellingence.IntValue +
                                "\nCrit: " + thisChar.BuffedCrit.IntValue + " (" + CombatHandler.ReturnCritPercent(thisChar.UnitLevel, thisChar.BuffedCrit.IntValue) + "%)" +
                                "\nSpeed: " + thisChar.BuffedSpeed.IntValue + " (" + CombatHandler.ReturnSpeedPercent(thisChar.UnitLevel, thisChar.BuffedSpeed.IntValue) + "%)" +
                                "\nAttack: " + thisChar.BuffedAttackDamage.IntValue +
                                "\nArmor: " + thisChar.BuffedArmor.IntValue;
            }

            return temp;
        }
Example #17
0
 public NPCFireball(Character _char, string _name, string _description, Image _icon, EnumAbilityClassReq _classReq)
     : base(_char, _name, _description, _icon, _classReq)
 {
     this.AbilityName = "Fireball";
     this.Description = "This ability deals 175% the units level in damage.";
     this.Icon = this.SetIcon(Properties.Resources.fireball);
 }
Example #18
0
 public NPCDesperation(Character _char, string _name, string _description, Image _icon, EnumAbilityClassReq _classReq)
     : base(_char, _name, _description, _icon, _classReq)
 {
     this.AbilityName = "Desperation";
     this.Description = "This ability deals 15% of the monsters health deficit in damage to a character!";
     this.Icon = this.SetIcon(Properties.Resources.strength);
 }
Example #19
0
 public Swift(Character _char, string _name, string _description, Image _icon, EnumAbilityClassReq _classReq)
     : base(_char, _name, _description, _icon, _classReq)
 {
     int buff = (int)(_char.BuffedAgility.IntValue * 0.4);
     this.AbilityName = "Swift";
     this.Description = _char.UnitName + " is Swift and has " + buff + " more Agility!";
     this.Icon = this.Icon = this.SetIcon(Properties.Resources.meleeattack);
 }
Example #20
0
 public CaretakerZealOfHumanity(Character _char, string _name, string _description, Image _icon, EnumAbilityClassReq _classReq)
     : base(_char, _name, _description, _icon, _classReq)
 {
     this.AbilityName = Properties.Resources.AbilitiesTitleCaretakerZealOfHumanity;
     this.Description = Properties.Resources.AbilitiesDescriptionCaretakerZealOfHumanity;
     this.Icon = this.SetIcon(Properties.Resources.bodyslam);
     this.NumberOfTargets = 1;
     this.TurnPointCost = 2;
     this.DamageOrHealing = EnumActiveAbilityType.Healing;
 }
Example #21
0
 public WizardRevitalize(Character _char, string _name, string _description, Image _icon, EnumAbilityClassReq _classReq)
     : base(_char, _name, _description, _icon, _classReq)
 {
     AbilityName = Properties.Resources.AbilitiesTitleWizardRevitalize;
     Description = Properties.Resources.AbilitiesDescriptionWizardRevitalize;
     this.Icon = this.SetIcon(Properties.Resources.heal);
     this.NumberOfTargets = 1;
     this.TurnPointCost = 2;
     this.DamageOrHealing = EnumActiveAbilityType.Healing;
 }
Example #22
0
        private void SetCharacterUserControl(int index)
        {
            flowLayoutPanelBattleChar.Controls.Clear();

            foreach (var character in player.ControlledCharacters)
            {
                if (character.UnitName.Equals(comboBoxChooseChar.Items[index]))
                {
                    choosechar = character;
                    break;
                }
            }

            if (choosechar != null)
                flowLayoutPanelBattleChar.Controls.Add(new ucCharacterInterface(choosechar, false));
            else
            {
                RPG.UI.MessageForm mes = new RPG.UI.MessageForm("Something truly horrible happened!");
                mes.ShowDialog();
            }
        }
Example #23
0
 public Venomous(Character _char, string _name, string _description, Image _icon, EnumAbilityClassReq _classReq)
     : base(_char, _name, _description, _icon, _classReq)
 {
     int buff = (int)(_char.BuffedAttackDamage.IntValue*0.5);
     this.AbilityName = "Venomous";
     this.Description = _char.UnitName + " is Venomous and has " + buff + " more Attack!";
     this.Icon = this.Icon = this.SetIcon(Properties.Resources.meleeattack);
 }
Example #24
0
 public NPCAtonementSmite(Character _char, string _name, string _description, Image _icon, EnumAbilityClassReq _classReq)
     : base(_char, _name, _description, _icon, _classReq)
 {
     this.AbilityName = "Atonement Smite";
     this.Description = "This ability deals the units level in damage and heals it for 2% of its maximum health.";
     this.Icon = this.SetIcon(Properties.Resources.fireball);
 }
Example #25
0
        public Blessed(Character _char, string _name, string _description, Image _icon, EnumAbilityClassReq _classReq)
            : base(_char, _name, _description, _icon, _classReq)
        {
            int buff = (int)(_char.BuffedAgility.IntValue * 0.4);
            string stat = "Agility";

            if (_char.BuffedAgility.IntValue < _char.BuffedIntellingence.IntValue)
            {
                buff = (int)(_char.BuffedIntellingence.IntValue * 0.4);
                stat = "Intellect";
                if (_char.BuffedIntellingence.IntValue < _char.BuffedStrength.IntValue)
                {
                    buff = (int)(_char.BuffedStrength.IntValue * 0.4);
                    stat = "Strength";
                }
            }
            else if (_char.BuffedAgility.IntValue < _char.BuffedStrength.IntValue)
            {
                buff = (int)(_char.BuffedStrength.IntValue * 0.4);
                stat = "Strength";
            }

            this.AbilityName = "Blessed";
            this.Description = _char.UnitName + " was Blessed by a Paladin and has its " + stat + " increased by " + buff + "!";
            this.Icon = this.Icon = this.SetIcon(Properties.Resources.meleeattack);
        }
Example #26
0
 public BuffsAndDebuffs(Character _char, string _name, string _description, Image _icon, EnumAbilityClassReq _classReq)
     : base(_char ,_name, _description, _icon, _classReq)
 {
 }
Example #27
0
 public InAction(Character _char, string _name, string _description, Image _icon, EnumAbilityClassReq _classReq)
     : base(_char, _name, _description, _icon, _classReq)
 {
     int agiBuff = (int)(_char.BuffedAgility.IntValue*0.2);
     int strBuff = (int)(_char.BuffedStrength.IntValue * 0.2);
     this.AbilityName = "In Action";
     this.Description = _char.UnitName + " is In Action and has " + strBuff + " more Strength and " + agiBuff + " more Agility!";
     this.Icon = this.Icon = this.SetIcon(Properties.Resources.meleeattack);
 }
Example #28
0
 public Infuriated(Character _char, string _name, string _description, Image _icon, EnumAbilityClassReq _classReq)
     : base(_char, _name, _description, _icon, _classReq)
 {
     int buff = (int)((_char.BuffedHP.IntValue - _char.CurrentHP.IntValue)*0.25);
     this.AbilityName = "Infuriated";
     this.Description = _char.UnitName + " is Infuriated and has " + buff + " more Attack Damage!";
     this.Icon = this.Icon = this.SetIcon(Properties.Resources.meleeattack);
 }
Example #29
0
 private void comboBoxChooseChar_SelectedIndexChanged(object sender, EventArgs e)
 {
     selectedCharacter = this.player.ControlledCharacters[comboBoxChooseChar.SelectedIndex];
     SetListBoxGear();
 }
Example #30
0
 public ThiefSwiftness(Character _char, string _name, string _description, Image _icon, EnumAbilityClassReq _classReq)
     : base(_char, _name, _description, _icon, _classReq)
 {
     this.AbilityName = Properties.Resources.AbilitiesTitleThiefSwiftness;
     this.Description = Properties.Resources.AbilitiesDescriptionThiefSwiftness;
     this.Icon = this.SetIcon(Properties.Resources.quickattack);
     this.NumberOfTargets = 1;
     this.TurnPointCost = 3;
     this.DamageOrHealing = EnumActiveAbilityType.Healing;
 }