Example #1
0
 public Monster(string name, MonsterSize s, MonsterType mt, int xp)
 {
     pName = name;
     setRace("Monster");
     mSize = s;
     mType = mt;
     xpValue = xp;
 }
Example #2
0
        public DieRoll SizeDamageDie(MonsterSize size)
        {
            if (DamageDie == null)
            {
                return(null);
            }

            return(DieRoll.StepDie(DamageDie, (size - MonsterSize.Medium)));
        }
        /// <summary>
        /// Initializes variable set for single object refresh
        /// </summary>
        private static void RefreshStepInit(out bool AddTocache)
        {
            CurrentCacheObject = new TrinityCacheObject();
            AddTocache         = true;
            // Start this object as off as unknown type
            CurrentCacheObject.Type = GObjectType.Unknown;

            CurrentCacheObject.Distance = 0f;
            CurrentCacheObject.Radius   = 0f;
            c_ZDiff           = 0f;
            c_ItemDisplayName = "";
            c_ItemLink        = "";
            CurrentCacheObject.InternalName = "";
            c_IgnoreReason                   = "";
            c_IgnoreSubStep                  = "";
            CurrentCacheObject.ACDGuid       = -1;
            CurrentCacheObject.RActorGuid    = -1;
            CurrentCacheObject.DynamicID     = -1;
            CurrentCacheObject.GameBalanceID = -1;
            CurrentCacheObject.ActorSNO      = -1;
            c_ItemLevel             = -1;
            c_GoldStackSize         = -1;
            c_HitPointsPct          = -1;
            c_HitPoints             = -1;
            c_IsOneHandedItem       = false;
            c_IsTwoHandedItem       = false;
            c_unit_IsElite          = false;
            c_unit_IsRare           = false;
            c_unit_IsUnique         = false;
            c_unit_IsMinion         = false;
            c_unit_IsTreasureGoblin = false;
            c_unit_IsAttackable     = false;
            c_unit_HasShieldAffix   = false;
            c_IsEliteRareUnique     = false;
            c_IsObstacle            = false;
            c_HasBeenNavigable      = false;
            c_HasBeenRaycastable    = false;
            c_HasBeenInLoS          = false;
            c_ItemMd5Hash           = string.Empty;
            c_ItemQuality           = ItemQuality.Invalid;
            c_DBItemBaseType        = ItemBaseType.None;
            c_DBItemType            = ItemType.Unknown;
            c_item_tFollowerType    = FollowerType.None;
            c_item_GItemType        = GItemType.Unknown;
            c_unit_MonsterSize      = MonsterSize.Unknown;
            c_diaObject             = null;
            c_CurrentAnimation      = SNOAnim.Invalid;
            c_HasDotDPS             = false;
            c_MonsterAffixes        = MonsterAffixes.None;
            c_IsFacingPlayer        = false;
            c_Rotation        = 0f;
            c_DirectionVector = Vector2.Zero;
        }
Example #4
0
 public SizeMods(MonsterSize size, String name, int attack, int combat, int fly, int stealth, string space,
                 int strength, int dexterity, int constitution, int naturalArmor)
 {
     _Size         = size;
     _Name         = name;
     _Attack       = attack;
     _Combat       = combat;
     _Fly          = fly;
     _Stealth      = stealth;
     _Space        = space;
     _Strength     = strength;
     _Dexterity    = dexterity;
     _Constitution = constitution;
     _NaturalArmor = naturalArmor;
 }
Example #5
0
        public static MonsterSize ChangeSize(MonsterSize size, int diff)
        {
            int sizeInt = (int)size;

            sizeInt += diff;

            if (sizeInt < 0)
            {
                sizeInt = 0;
            }

            if (sizeInt > 8)
            {
                sizeInt = 8;
            }

            return((MonsterSize)sizeInt);
        }
        private float GetSizeWeight(DiaUnit u)
        {
            float       sizeWeight = 1f;
            MonsterSize ms         = u.GetMonsterSize();

            switch (ms)
            {
            case MonsterSize.Boss:
                sizeWeight = 1.5f;
                break;

            case MonsterSize.Swarm:
                sizeWeight = 1.4f;
                break;

            case MonsterSize.Ranged:
                sizeWeight = 1.3f;
                break;
            }
            return(sizeWeight);
        }
Example #7
0
        public string SizeDamageText(MonsterSize size)
        {
            DieRoll roll = SizeDamageDie(size);

            if (roll == null)
            {
                return("");
            }

            string critText = "";

            if (CritRange != 20)
            {
                critText += "/" + CritRange + "-20";
            }

            if (CritMultiplier != 2)
            {
                critText += "/x" + CritMultiplier;
            }

            return(roll.Text + critText);
        }
Example #8
0
        //create a blank weapon from an attack
        public Weapon(Attack attack, bool ranged, MonsterSize size)
        {
            _Name = attack.Name;

            DieRoll medRoll = DieRoll.StepDie(attack.Damage, ((int)MonsterSize.Medium) - (int)size);
            DieRoll smRoll  = DieRoll.StepDie(attack.Damage, -1);

            _DmgM = new DieStep(medRoll).ToString();
            _DmgS = new DieStep(smRoll).ToString();

            _CritRange      = attack.CritRange;
            _CritMultiplier = attack.CritMultiplier;

            if (attack.Bonus.Count > 1)
            {
                _Class = "Martial";
            }
            else
            {
                _Class = "Natural";
            }

            if (ranged)
            {
                _Hands = "Ranged";
            }
            else
            {
                _Hands = "One-Handed";
            }

            _RangedTouch    = attack.RangedTouch;
            _AltDamage      = attack.AltDamage;
            _AltDamageStat  = attack.AltDamageStat;
            _AltDamageDrain = attack.AltDamageDrain;
        }
Example #9
0
            /// <summary>
            /// Constructor used by ReferenceActorMeta collection initializer records.
            /// This imports a previously exported set of data.
            /// </summary>
            public ActorMeta(int actorSNO, int monsterSNO, string internalName, int actorType, double radius, int monsterType, int monsterRace, int monsterSize,
                int gizmoType, bool isSummoner, bool isHostile, bool isNPC, int physMeshSNO, int apperanceSNO, int animSetSNO, bool isMerchant, bool isBarracade,
                bool gizmoIsTownPortal, bool gizmoIsPortal, bool gizmoIsDisabledByScript, bool gizmoIsDestructible, int gizmoGrantsNoXp, int gizmoDefaultCharges,
                int gizmoDefaultState, int gizmoDropNoLoot, bool gizmoIsOperatable, bool gizmoIsBarracade, int petType, bool isSummoned, bool isSalvageShortcut,
                int hirelingType, bool isHelper, bool isDefaultHidden, bool isQuestGiver, bool isGizmo, bool isUnit, bool isMonster)
            {
                ActorSNO = actorSNO;
                MonsterSNO = monsterSNO;
                InternalName = internalName;
                ActorType = (ActorType)actorType;
                Radius = radius;
                MonsterType = (MonsterType)monsterType;
                MonsterRace = (MonsterRace)monsterRace;
                MonsterSize = (MonsterSize)monsterSize;
                GizmoType = (GizmoType)gizmoType;
                IsSummoner = isSummoner;
                IsHostile = isHostile;
                IsNPC = isNPC;
                PhysMeshSNO = physMeshSNO;
                ApperanceSNO = apperanceSNO;
                AnimSetSNO = animSetSNO;
                IsMerchant = isMerchant;
                IsBarracade = isBarracade;
                GizmoIsTownPortal = gizmoIsTownPortal;
                GizmoIsPortal = gizmoIsPortal;
                GizmoIsDisabledByScript = gizmoIsDisabledByScript;
                GizmoIsDestructible = gizmoIsDestructible;
                GizmoGrantsNoXp = gizmoGrantsNoXp;
                GizmoDefaultCharges = gizmoDefaultCharges;
                GizmoDefaultState = gizmoDefaultState;
                GizmoDropNoLoot = gizmoDropNoLoot;
                GizmoIsOperatable = gizmoIsOperatable;
                GizmoIsBarracade = gizmoIsBarracade;
                PetType = petType;
                IsSummoned = isSummoned;
                IsSalvageShortcut = isSalvageShortcut;
                HirelingType = (HirelingType) hirelingType;
                IsHelper = isHelper;
                IsDefaultHidden = isDefaultHidden;
                IsQuestGiver = isQuestGiver;
                IsGizmo = isGizmo;
                IsUnit = isUnit;
                IsMonster = isMonster;

                _isPartial = false;
                _isValid = true;
            }
Example #10
0
 public static int StepsFromMedium(MonsterSize size)
 {
     return(size - CombatManager.MonsterSize.Medium);
 }
Example #11
0
 public static SizeMods GetMods(MonsterSize size)
 {
     return(sizeModsDictionary[size]);
 }
Example #12
0
 public static string GetSizeText(MonsterSize size)
 {
     return(sizeModsDictionary[size].Name);
 }
Example #13
0
 /// <summary>
 /// Initializes variable set for single object refresh
 /// </summary>
 private static void RefreshStepInit()
 {
     CurrentCacheObject = new TrinityCacheObject();
     // Start this object as off as unknown type
     CurrentCacheObject.Type = TrinityObjectType.Unknown;
     CurrentCacheObject.GizmoType = GizmoType.None;
     CurrentCacheObject.Distance = 0f;
     CurrentCacheObject.Radius = 0f;
     c_ZDiff = 0f;
     c_ItemDisplayName = "";
     c_ItemLink = "";
     CurrentCacheObject.InternalName = "";
     c_IgnoreReason = "";
     c_IgnoreSubStep = "";
     CurrentCacheObject.ACDGuid = -1;
     CurrentCacheObject.RActorGuid = -1;
     CurrentCacheObject.DynamicID = -1;
     CurrentCacheObject.GameBalanceID = -1;
     CurrentCacheObject.ActorSNO = -1;
     c_ItemLevel = -1;
     c_GoldStackSize = -1;
     c_HitPointsPct = -1;
     c_HitPoints = -1;
     c_IsOneHandedItem = false;
     c_IsTwoHandedItem = false;
     c_unit_IsElite = false;
     c_unit_IsRare = false;
     c_unit_IsUnique = false;
     c_unit_IsMinion = false;
     c_unit_IsTreasureGoblin = false;
     c_unit_IsAttackable = false;
     c_unit_HasShieldAffix = false;
     c_IsEliteRareUnique = false;
     c_IsObstacle = false;
     c_HasBeenNavigable = false;
     c_HasBeenRaycastable = false;
     c_HasBeenInLoS = false;
     c_ItemMd5Hash = string.Empty;
     c_ItemQuality = ItemQuality.Invalid;
     c_DBItemBaseType = ItemBaseType.None;
     c_DBItemType = ItemType.Unknown;
     c_item_tFollowerType = FollowerType.None;
     _cItemTinityItemType = TrinityItemType.Unknown;
     c_unit_MonsterSize = MonsterSize.Unknown;
     c_diaObject = null;
     c_diaGizmo = null;
     c_CurrentAnimation = SNOAnim.Invalid;
     c_HasDotDPS = false;
     c_MonsterAffixes = MonsterAffixes.None;
 }
Example #14
0
 public SNO(int sno, String internalname, ActorType? actortype=null, TargetType? targettype=null, MonsterType? monstertype=null, MonsterSize? monstersize=null, float? collisionradius=null, bool? canburrow=null, bool? grantsnoxp=null, bool? dropsnoloot=null, bool? isbarricade=null, ObstacleType? obstacletype=null, float? actorsphereradius=null, GizmoType? gimzotype=null)
 {
     //Creates the perm data
              SNOID=sno;
              _actortype=actortype;
              _targettype=targettype;
              _collisionradius=collisionradius;
              _monstersize=monstersize;
              _monstertype=monstertype;
              _internalname=internalname;
              _CanBurrow=canburrow;
              _DropsNoLoot=dropsnoloot;
              _GrantsNoXP=grantsnoxp;
              _IsBarricade=isbarricade;
              _obstacletype=obstacletype;
              _actorsphereradius=actorsphereradius;
              _gizmotype=gimzotype;
              //_RunningRate=runningrate;
              IsFinalized=true;
 }
Example #15
0
 public CachedSNOEntry(int sno, String internalname, ActorType? actortype=null, TargetType? targettype=null, MonsterType? monstertype=null, MonsterSize? monstersize=null, float? collisionradius=null, bool? canburrow=null, bool? grantsnoxp=null, bool? dropsnoloot=null, bool? isbarricade=null, ObstacleType? obstacletype=null, float? actorsphereradius=null, GizmoType? gizmotype=null)
     : base(sno, internalname, actortype, targettype, monstertype, monstersize, collisionradius, canburrow, grantsnoxp, dropsnoloot, isbarricade, obstacletype, actorsphereradius, gizmotype)
 {
 }