public Condition GetCustomCondition() { _Condition.Name = CustomNameBox.Text.Trim(); if (CustomTextBox.Text.Length > 0) { _Condition.Text = CustomTextBox.Text; } if (CustomImageBox.SelectedIndex != -1) { _Condition.Image = (string)CustomImageBox.SelectedItem; } else { _Condition.Image = "star"; } _Condition.Custom = true; _Condition.Bonus = null; if (CustomBonusCheckBox.IsChecked == true) { ConditionBonus b = (ConditionBonus)CustomBonusBorder.DataContext; _Condition.Bonus = b; } return(_Condition); }
private void OKButton_Click(object sender, System.Windows.RoutedEventArgs e) { ConditionBonus b = (ConditionBonus)CustomBonusBorder.DataContext; _Spell.Bonus = b; DialogResult = true; Close(); }
public Condition(Condition c) { _Name = c._Name; _Text = c._Text; _Image = c._Image; _Spell = c._Spell; _Custom = c._Custom; if (c._Bonus != null) { _Bonus = new ConditionBonus(c._Bonus); } if (c._Affliction != null) { _Affliction = (Affliction)c._Affliction.Clone(); } }
public ConditionBonus(ConditionBonus bonus) { _Str = bonus._Str; _Dex = bonus._Dex; _Con = bonus._Con; _Int = bonus._Int; _Wis = bonus._Wis; _Cha = bonus._Cha; _StrSkill = bonus._StrSkill; _DexSkill = bonus._DexSkill; _ConSkill = bonus._ConSkill; _IntSkill = bonus._IntSkill; _WisSkill = bonus._WisSkill; _ChaSkill = bonus._ChaSkill; _Dodge = bonus._Dodge; _Armor = bonus._Armor; _Shield = bonus._Shield; _NaturalArmor = bonus._NaturalArmor; _Deflection = bonus._Deflection; _Initiative = bonus._Initiative; _AllAttack = bonus._AllAttack; _AC = bonus._AC; _MeleeAttack = bonus._MeleeAttack; _RangedAttack = bonus._RangedAttack; _AttackDamage = bonus._AttackDamage; _MeleeDamage = bonus._MeleeDamage; _RangedDamage = bonus._RangedDamage; _Perception = bonus._Perception; _LoseDex = bonus._LoseDex; _Size = bonus._Size; _Fort = bonus._Fort; _Ref = bonus._Ref; _Will = bonus._Will; _AllSaves = bonus._AllSaves; _AllSkills = bonus._AllSkills; _CMB = bonus.CMB; _CMD = bonus.CMD; _StrZero = bonus._StrZero; _DexZero = bonus._DexZero; _HP = bonus._HP; }
public virtual void ApplyBonus(ConditionBonus bonus, bool remove) { }