Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        public static string GetPowerActionTypeName(PowerActionType actionType)
        {
            switch (actionType)
            {
            case PowerActionType.ImmediateInterrupt:
                return("Immediate Interrupt");

            case PowerActionType.ImmediateReaction:
                return("Immediate Reaction");

            default:
                return(Enum.Format(typeof(PowerActionType), actionType, "G"));
            }
        }