public Power(Player player) { this.player = player; this.name = ""; this.powerType = PowerType.AtWill; this.actionType = PowerActionType.Standard; this.level = 1; this.description = ""; this.notes = ""; this.attackType = PowerAttackType.Weapon; this.attackWeapon = WeaponSlot.MainWeapon; this.attackAttribute = AttributeType.Strength; this.defenseType = DefenseType.AC; this.weaponDamageMultiplier = 1; this.damageType = ""; this.bonusDamageAttribute = null; this.attackModifiers = new BasicAdjustmentList(); this.damageModifiers = new BasicAdjustmentList(); player.PropertyChanged += new PropertyChangedEventHandler(player_PropertyChanged); playerWeapon = Weapon; if (playerWeapon != null) { playerWeapon.PropertyChanged += new PropertyChangedEventHandler(playerWeapon_PropertyChanged); } attackModifiers.CollectionChanged += new System.Collections.Specialized.NotifyCollectionChangedEventHandler(attackModifiers_CollectionChanged); attackModifiers.ContainedElementChanged += new PropertyChangedEventHandler(attackModifiers_ContainedElementChanged); damageModifiers.CollectionChanged += new System.Collections.Specialized.NotifyCollectionChangedEventHandler(damageModifiers_CollectionChanged); damageModifiers.ContainedElementChanged += new PropertyChangedEventHandler(damageModifiers_ContainedElementChanged); }
public SkillValue(Player player, Skill skill, bool isTrained) { this.player = player; this.skill = skill; this.isTrained = isTrained; this.miscAdjustments = new BasicAdjustmentList(); player.PropertyChanged += new PropertyChangedEventHandler(player_PropertyChanged); if (player.Armor != null) { player.Armor.PropertyChanged += new PropertyChangedEventHandler(Armor_PropertyChanged); } playerArmor = player.Armor; if (player.Shield != null) { player.Shield.PropertyChanged += new PropertyChangedEventHandler(Shield_PropertyChanged); } playerShield = player.Shield; miscAdjustments.ContainedElementChanged += new PropertyChangedEventHandler(miscAdjustments_ContainedElementChanged); miscAdjustments.CollectionChanged += new System.Collections.Specialized.NotifyCollectionChangedEventHandler(miscAdjustments_CollectionChanged); }
public WeaponSpecValue(Player player, WeaponSlot slot) { this.player = player; this.slot = slot; this.toHitAdjustments = new BasicAdjustmentList(); this.damageAdjustments = new BasicAdjustmentList(); player.PropertyChanged += new PropertyChangedEventHandler(player_PropertyChanged); playerWeapon = Weapon; if (Weapon != null) { Weapon.PropertyChanged += new PropertyChangedEventHandler(Weapon_PropertyChanged); } if (Weapon != null) { weaponBonus = player.WeaponBonuses[Weapon]; if (weaponBonus != null) { weaponBonus.PropertyChanged += new PropertyChangedEventHandler(bonus_PropertyChanged); } } toHitAdjustments.ContainedElementChanged += new PropertyChangedEventHandler(toHitAdjustments_ContainedElementChanged); toHitAdjustments.CollectionChanged += new System.Collections.Specialized.NotifyCollectionChangedEventHandler(toHitAdjustments_CollectionChanged); damageAdjustments.ContainedElementChanged += new PropertyChangedEventHandler(damageAdjustments_ContainedElementChanged); damageAdjustments.CollectionChanged += new System.Collections.Specialized.NotifyCollectionChangedEventHandler(damageAdjustments_CollectionChanged); }
public InitiativeValue(Player player) { this.player = player; this.miscAdjustments = new BasicAdjustmentList(); player.PropertyChanged += new PropertyChangedEventHandler(player_PropertyChanged); miscAdjustments.ContainedElementChanged += new PropertyChangedEventHandler(miscAdjustments_ContainedElementChanged); miscAdjustments.CollectionChanged += new System.Collections.Specialized.NotifyCollectionChangedEventHandler(miscAdjustments_CollectionChanged); }
public WeaponBonusValue(BasicAdjustmentList toHitAdjustments, BasicAdjustmentList damageAdjustments) { this.toHitAdjustments = toHitAdjustments; this.damageAdjustments = damageAdjustments; toHitAdjustments.ContainedElementChanged += new PropertyChangedEventHandler(toHitAdjustments_ContainedElementChanged); toHitAdjustments.CollectionChanged += new System.Collections.Specialized.NotifyCollectionChangedEventHandler(toHitAdjustments_CollectionChanged); damageAdjustments.ContainedElementChanged += new PropertyChangedEventHandler(damageAdjustments_ContainedElementChanged); damageAdjustments.CollectionChanged += new System.Collections.Specialized.NotifyCollectionChangedEventHandler(damageAdjustments_CollectionChanged); }
public HitPointsValue(Player player) { this.player = player; this.miscAdjustments = new BasicAdjustmentList(); this.playerClass = player.Class; if (player.Class != null) { player.Class.PropertyChanged += new PropertyChangedEventHandler(Class_PropertyChanged); } player.PropertyChanged += new PropertyChangedEventHandler(player_PropertyChanged); miscAdjustments.ContainedElementChanged += new PropertyChangedEventHandler(miscAdjustments_ContainedElementChanged); miscAdjustments.CollectionChanged += new System.Collections.Specialized.NotifyCollectionChangedEventHandler(miscAdjustments_CollectionChanged); }
public void CopyValues(BasicAdjustmentList toHitList, BasicAdjustmentList damageList) { toHitAdjustments.Clear(); foreach (BasicAdjustment adjustment in toHitList) { toHitAdjustments.Add(new BasicAdjustment(adjustment.Modifier, adjustment.Note)); } damageAdjustments.Clear(); foreach (BasicAdjustment adjustment in damageList) { damageAdjustments.Add(new BasicAdjustment(adjustment.Modifier, adjustment.Note)); } }
public SpeedValue(Player player) { this.player = player; this.miscAdjustments = new BasicAdjustmentList(); player.PropertyChanged += new PropertyChangedEventHandler(player_PropertyChanged); this.playerRace = player.Race; if (player.Race != null) { player.Race.PropertyChanged += new PropertyChangedEventHandler(Race_PropertyChanged); } miscAdjustments.ContainedElementChanged += new PropertyChangedEventHandler(miscAdjustments_ContainedElementChanged); miscAdjustments.CollectionChanged += new System.Collections.Specialized.NotifyCollectionChangedEventHandler(miscAdjustments_CollectionChanged); }
public DefenseValue(Player player, DefenseType defenseType) { this.player = player; this.defenseType = defenseType; this.miscAdjustments = new BasicAdjustmentList(); player.PropertyChanged += new PropertyChangedEventHandler(player_PropertyChanged); this.playerClass = player.Class; if (player.Class != null) { player.Class.PropertyChanged += new PropertyChangedEventHandler(Class_PropertyChanged); } miscAdjustments.ContainedElementChanged += new PropertyChangedEventHandler(miscAdjustments_ContainedElementChanged); miscAdjustments.CollectionChanged += new NotifyCollectionChangedEventHandler(miscAdjustments_CollectionChanged); }