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(); } }
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); }
public Ability(Character _char, string _abilityName, string _description, Image _icon, EnumAbilityClassReq _classRep) { this.abilityName = _abilityName; this.description = _description; this.SetIcon(_icon); this.classReq = _classRep; }
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); }
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); }
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); }
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); }
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); }
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); }
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; }
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; }
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); }
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); }
/// <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; }
/// <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; } }
/// <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; }
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); }
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); }
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); }
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; }
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; }
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(); } }
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); }
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); }
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); }
public BuffsAndDebuffs(Character _char, string _name, string _description, Image _icon, EnumAbilityClassReq _classReq) : base(_char ,_name, _description, _icon, _classReq) { }
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); }
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); }
private void comboBoxChooseChar_SelectedIndexChanged(object sender, EventArgs e) { selectedCharacter = this.player.ControlledCharacters[comboBoxChooseChar.SelectedIndex]; SetListBoxGear(); }
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; }