コード例 #1
0
 public ExplosionOptions(ExplosionOptions Clone)
 {
     ExplosionRadius                    = Clone.ExplosionRadius;
     ExplosionWindPowerAtCenter         = Clone.ExplosionWindPowerAtCenter;
     ExplosionWindPowerAtEdge           = Clone.ExplosionWindPowerAtEdge;
     ExplosionWindPowerToSelfMultiplier = Clone.ExplosionWindPowerToSelfMultiplier;
     ExplosionDamageAtCenter            = Clone.ExplosionDamageAtCenter;
     ExplosionDamageAtEdge              = Clone.ExplosionDamageAtEdge;
     ExplosionDamageToSelfMultiplier    = Clone.ExplosionDamageToSelfMultiplier;
 }
コード例 #2
0
        public void Init(BinaryReader BR, ContentManager Content, string AttackName, Dictionary <string, BaseSkillRequirement> DicRequirement, Dictionary <string, BaseEffect> DicEffect,
                         Dictionary <string, AutomaticSkillTargetType> DicAutomaticSkillTarget)
        {
            //Create the Part file.
            this.ItemName    = Path.GetFileNameWithoutExtension("Content/Attacks/" + AttackName + ".pew");
            this.Description = BR.ReadString();

            this.PowerFormula      = BR.ReadString();
            this.MinDamageFormula  = BR.ReadString();
            this.ENCost            = BR.ReadInt32();
            this.MaxAmmo           = BR.ReadInt32();
            this.MoraleRequirement = BR.ReadInt32();
            this.RangeMinimum      = BR.ReadInt32();
            this.RangeMaximum      = BR.ReadInt32();
            this.Accuracy          = BR.ReadInt32();
            this.Critical          = BR.ReadInt32();

            this.Pri = (WeaponPrimaryProperty)BR.ReadByte();
            if (this.Pri == WeaponPrimaryProperty.MAP)
            {
                MAPAttributes = new MAPAttackAttributes(BR);
            }
            else if (this.Pri == WeaponPrimaryProperty.PER)
            {
                PERAttributes = new PERAttackAttributes(BR, Content);
            }

            this.Sec = (WeaponSecondaryProperty)BR.ReadByte();
            PostMovementAccuracyMalus = BR.ReadByte();
            PostMovementEvasionBonus  = BR.ReadByte();

            ExplosionOption = new ExplosionOptions(BR);

            int AttackType = BR.ReadInt32();

            if (AttackType == 0)
            {
                this.AttackType = "Blank";
                Style           = WeaponStyle.M;
            }
            else if (AttackType == 1)
            {
                this.AttackType = "Melee";
                Style           = WeaponStyle.M;
            }
            else if (AttackType == 2)
            {
                this.AttackType = "Solid blade";
                Style           = WeaponStyle.M;
            }
            else if (AttackType == 3)
            {
                this.AttackType = "Energy blade";
                Style           = WeaponStyle.M;
            }
            else if (AttackType == 4)
            {
                this.AttackType = "Solid shot";
                Style           = WeaponStyle.R;
            }
            else if (AttackType == 5)
            {
                this.AttackType = "Energy shot";
                Style           = WeaponStyle.R;
            }
            else if (AttackType == 6)
            {
                this.AttackType = "Remote";
                Style           = WeaponStyle.R;
            }
            else if (AttackType == 7)
            {
                this.AttackType = "Special";
                Style           = WeaponStyle.R;
            }

            int TerrainGradeAir   = BR.ReadInt32();
            int TerrainGradeLand  = BR.ReadInt32();
            int TerrainGradeSea   = BR.ReadInt32();
            int TerrainGradeSpace = BR.ReadInt32();

            char[] Grades = new char[6] {
                '-', 'S', 'A', 'B', 'C', 'D'
            };
            DicTerrainAttribute = new Dictionary <string, char>(4);
            DicTerrainAttribute.Add(UnitStats.TerrainAir, Grades[TerrainGradeAir]);
            DicTerrainAttribute.Add(UnitStats.TerrainLand, Grades[TerrainGradeLand]);
            DicTerrainAttribute.Add(UnitStats.TerrainSea, Grades[TerrainGradeSea]);
            DicTerrainAttribute.Add(UnitStats.TerrainSpace, Grades[TerrainGradeSpace]);

            Int32 AttackAttributesCount = BR.ReadInt32();

            this.ArrayAttackAttributes = new BaseAutomaticSkill[AttackAttributesCount];

            for (int S = 0; S < AttackAttributesCount; ++S)
            {
                string RelativePath = BR.ReadString();
                ArrayAttackAttributes[S] = new BaseAutomaticSkill("Content/Attacks/Attributes/" + RelativePath + ".peaa", RelativePath, DicRequirement, DicEffect, DicAutomaticSkillTarget);
            }

            ListQuoteSet = new List <string>();
            int ListQuoteSetCount = BR.ReadInt32();

            for (int R = 0; R < ListQuoteSetCount; R++)
            {
                ListQuoteSet.Add(BR.ReadString());
            }
        }