示例#1
0
        public override IEnumerable <Mod> GetModsFor(ModType type)
        {
            switch (type)
            {
            case ModType.DifficultyReduction:
                return(new Mod[]
                {
                    new BosuModEasy(),
                    new BosuModNoFail(),
                    new MultiMod(new BosuModHalfTime(), new BosuModDaycore())
                });

            case ModType.DifficultyIncrease:
                return(new Mod[]
                {
                    new BosuModSuddenDeath(),
                    new MultiMod(new BosuModDoubleTime(), new BosuModNightcore())
                });

            case ModType.Automation:
                return(new Mod[]
                {
                    new MultiMod(new BosuModAutoplay(), new BosuModCinema()),
                });

            case ModType.Fun:
                return(new Mod[]
                {
                    new MultiMod(new ModWindUp(), new ModWindDown())
                });

            default:
                return(Array.Empty <Mod>());
            }
        }
示例#2
0
 public Modifier(ModType type, string name, string description, double mod) : this()
 {
     this.type         = type;
     this.name         = name;
     this.description  = description;
     this.modification = mod;
 }
示例#3
0
        public ModSection(ModType type)
        {
            ModType = type;

            AutoSizeAxes     = Axes.Y;
            RelativeSizeAxes = Axes.X;

            Origin = Anchor.TopCentre;
            Anchor = Anchor.TopCentre;

            InternalChildren = new[]
            {
                header           = CreateHeader(type.Humanize(LetterCasing.Title)),
                ButtonsContainer = new FillFlowContainer <ModButtonEmpty>
                {
                    AutoSizeAxes     = Axes.Y,
                    RelativeSizeAxes = Axes.X,
                    Origin           = Anchor.BottomLeft,
                    Anchor           = Anchor.BottomLeft,
                    Spacing          = new Vector2(50f, 0f),
                    Margin           = new MarginPadding
                    {
                        Top = 20,
                    },
                    AlwaysPresent = true
                },
            };
        }
示例#4
0
        public override IEnumerable <Mod> GetModsFor(ModType type)
        {
            switch (type)
            {
            case ModType.DifficultyReduction:
                return(new Mod[]
                {
                    new ManiaModEasy(),
                    new ManiaModNoFail(),
                    new MultiMod(new ManiaModHalfTime(), new ManiaModDaycore()),
                });

            case ModType.DifficultyIncrease:
                return(new Mod[]
                {
                    new ManiaModHardRock(),
                    new MultiMod(new ManiaModSuddenDeath(), new ManiaModPerfect()),
                    new MultiMod(new ManiaModDoubleTime(), new ManiaModNightcore()),
                    new MultiMod(new ManiaModFadeIn(), new ManiaModHidden()),
                    new ManiaModFlashlight(),
                });

            case ModType.Conversion:
                return(new Mod[]
                {
                    new MultiMod(new ManiaModKey4(),
                                 new ManiaModKey5(),
                                 new ManiaModKey6(),
                                 new ManiaModKey7(),
                                 new ManiaModKey8(),
                                 new ManiaModKey9(),
                                 new ManiaModKey10(),
                                 new ManiaModKey1(),
                                 new ManiaModKey2(),
                                 new ManiaModKey3()),
                    new ManiaModRandom(),
                    new ManiaModDualStages(),
                    new ManiaModMirror(),
                    new ManiaModDifficultyAdjust(),
                    new ManiaModInvert(),
                });

            case ModType.Automation:
                return(new Mod[]
                {
                    new MultiMod(new ManiaModAutoplay(), new ManiaModCinema()),
                });

            case ModType.Fun:
                return(new Mod[]
                {
                    new MultiMod(new ModWindUp(), new ModWindDown()),
                    new ManiaModFunBeats(),
                });

            default:
                return(Array.Empty <Mod>());
            }
        }
示例#5
0
文件: OsuRuleset.cs 项目: neoayi/osu
        public override IEnumerable <Mod> GetModsFor(ModType type)
        {
            switch (type)
            {
            case ModType.DifficultyReduction:
                return(new Mod[]
                {
                    new OsuModEasy(),
                    new OsuModNoFail(),
                    new MultiMod(new OsuModHalfTime(), new OsuModDaycore()),
                });

            case ModType.DifficultyIncrease:
                return(new Mod[]
                {
                    new OsuModHardRock(),
                    new MultiMod(new OsuModSuddenDeath(), new OsuModPerfect()),
                    new MultiMod(new OsuModDoubleTime(), new OsuModNightcore()),
                    new OsuModHidden(),
                    new MultiMod(new OsuModFlashlight(), new OsuModBlinds()),
                });

            case ModType.Conversion:
                return(new Mod[]
                {
                    new OsuModTarget(),
                    new OsuModDifficultyAdjust(),
                });

            case ModType.Automation:
                return(new Mod[]
                {
                    new MultiMod(new OsuModAutoplay(), new OsuModCinema()),
                    new OsuModRelax(),
                    new OsuModAutopilot(),
                    new OsuModSpunOut(),
                });

            case ModType.Fun:
                return(new Mod[]
                {
                    new OsuModTransform(),
                    new OsuModWiggle(),
                    new OsuModSpinIn(),
                    new MultiMod(new OsuModGrow(), new OsuModDeflate()),
                    new MultiMod(new ModWindUp(), new ModWindDown()),
                    new OsuModTraceable(),
                });

            case ModType.System:
                return(new Mod[]
                {
                    new OsuModTouchDevice(),
                });

            default:
                return(Array.Empty <Mod>());
            }
        }
示例#6
0
 public void CollectMod(ModType modType)
 {
     if (modInventory.ContainsKey(modType) && !modInventory[modType].isCollected)
     {
         modInventory[modType].isCollected = true;
         availableMods.Add(modType);
     }
 }
示例#7
0
 public Mod GetMod(ModType modType, ModSpot modSpot)
 {
     if (modInventory.ContainsKey(modType))
     {
         return(modInventory[modType].GetMod(modSpot));
     }
     return(null);
 }
示例#8
0
 public Transform GetModParent(ModType modType)
 {
     if (modInventory.ContainsKey(modType))
     {
         return(modInventory[modType].parent);
     }
     return(null);
 }
示例#9
0
 public bool IsModCollected(ModType modType)
 {
     if (modInventory.ContainsKey(modType))
     {
         return(modInventory[modType].isCollected);
     }
     return(false);
 }
示例#10
0
    private float timeLeft;     //Time left before expiry

    Modifier(string modName, float val, int ttl, bool _isStackable, ModType _modType)
    {
        timeToLive   = ttl;
        modValue     = val;
        modType      = _modType;
        modifierName = modName;
        isStackable  = _isStackable;
    }
 protected ModBase(string name, IGame game, ModType type) : this(game, type)
 {
     if (string.IsNullOrEmpty(name))
     {
         throw new PetroglyphModException("The mod's name must not be null or empty!");
     }
     _name = name;
 }
示例#12
0
 public Mod(ModType type, ModLevel level, string name, string path, TinyMinecraftVersion version)
 {
     this.type    = type;
     this.level   = level;
     this.name    = name;
     this.path    = path;
     this.version = version;
 }
示例#13
0
 public Mod(ModType type, ModLevel level, string name, string path, TinyMinecraftVersion version)
 {
     this.type = type;
     this.level = level;
     this.name = name;
     this.path = path;
     this.version = version;
 }
示例#14
0
 public Modifier(ModType type, string name, string description, double mod)
     : this()
 {
     this.type = type;
     this.name = name;
     this.description = description;
     this.modification = mod;
 }
        public void AddModification(ModType type)
        {
            var newMod = type == ModType.structural
                ? Settings.Default.StaticModList.EditItem(this, null, Settings.Default.StaticModList, null)
                : Settings.Default.HeavyModList.EditItem(this, null, Settings.Default.HeavyModList, null);

            AddModification(newMod, type);
        }
示例#16
0
    private void AttachMods(ModType left, ModType right)
    {
        GameObject rightHandMod = InstantiateMod(right);
        GameObject leftHandMod  = InstantiateMod(left);

        InitializeAndAttachMod(rightHandMod);
        InitializeAndAttachMod(leftHandMod);
    }
示例#17
0
        static bool TypeMatch(ModType a, ModType b)
        {
            if (!TypeMatch(a.ModifierType, b.ModifierType))
            {
                return(false);
            }

            return(TypeMatch(a.ElementType, b.ElementType));
        }
示例#18
0
 public static string GetFileExtension(this ModType modType)
 {
     return(modType switch
     {
         ModType.Master => Mutagen.Bethesda.Kernel.Constants.Esm,
         ModType.LightMaster => Mutagen.Bethesda.Kernel.Constants.Esl,
         ModType.Plugin => Mutagen.Bethesda.Kernel.Constants.Esp,
         _ => throw new NotImplementedException()
     });
示例#19
0
            // more fields can be added (see in visualGGPK)

            public ModRecord(Memory m, StatsDat sDat, TagsDat tagsDat, long addr)
            {
                Address  = addr;
                Key      = m.ReadStringU(m.ReadLong(addr + 0));
                Unknown8 = m.ReadLong(addr + 0x8);
                MinLevel = m.ReadInt(addr + 0x1C);

                StatNames = new[]
                {
                    m.ReadLong(addr + 0x28) == 0
                        ? null
                        : sDat.records[m.ReadStringU(m.ReadLong(m.ReadLong(addr + 0x28)))],
                    m.ReadLong(addr + 0x38) == 0
                        ? null
                        : sDat.records[m.ReadStringU(m.ReadLong(m.ReadLong(addr + 0x38)))],
                    m.ReadLong(addr + 0x48) == 0
                        ? null
                        : sDat.records[m.ReadStringU(m.ReadLong(m.ReadLong(addr + 0x48)))],
                    m.ReadLong(addr + 0x58) == 0
                        ? null
                        : sDat.records[m.ReadStringU(m.ReadLong(m.ReadLong(addr + 0x58)))]
                };

                Domain = (ModDomain)m.ReadInt(addr + 0x60);

                UserFriendlyName = m.ReadStringU(m.ReadLong(addr + 0x64));

                AffixType = (ModType)m.ReadInt(addr + 0x6C);
                Group     = m.ReadStringU(m.ReadLong(addr + 0x70));

                StatRange = new[]
                {
                    new IntRange(m.ReadInt(addr + 0x78), m.ReadInt(addr + 0x7C)),
                    new IntRange(m.ReadInt(addr + 0x80), m.ReadInt(addr + 0x84)),
                    new IntRange(m.ReadInt(addr + 0x88), m.ReadInt(addr + 0x8C)),
                    new IntRange(m.ReadInt(addr + 0x90), m.ReadInt(addr + 0x94))
                };

                Tags = new TagsDat.TagRecord[m.ReadLong(addr + 0x98)];
                long ta = m.ReadLong(addr + 0xA0);

                for (int i = 0; i < Tags.Length; i++)
                {
                    long ii = ta + 0x8 + 0x10 * i;
                    Tags[i] = tagsDat.records[m.ReadStringU(m.ReadLong(ii, 0), 255)];
                }

                TagChances = new Dictionary <string, int>(m.ReadInt(addr + 0xA8));
                long tc = m.ReadLong(addr + 0xB0);

                for (int i = 0; i < Tags.Length; i++)
                {
                    TagChances[Tags[i].Key] = m.ReadInt(tc + 4 * i);
                }
                IsEssence = m.ReadByte(addr + 0x1AC) == 0x01;
                Tier      = m.ReadStringU(m.ReadLong(addr + 0x1C5));
            }
示例#20
0
    public static Modifier CreateModifier(int value, Stat targetStat, ModType type)
    {
        var Mod = CreateInstance <Modifier>();

        Mod.Value  = value;
        Mod.Target = targetStat;
        Mod.Type   = type;
        return(Mod);
    }
示例#21
0
            public override IEnumerable <Mod> GetModsFor(ModType type)
            {
                if (type == ModType.Conversion)
                {
                    return(base.GetModsFor(type).Concat(new[] { new TestUnimplementedMod() }));
                }

                return(base.GetModsFor(type));
            }
示例#22
0
    public static String GetMainAssetName(ModType modType)
    {
        if (!mainAssets.ContainsKey(modType))
        {
            throw new System.InvalidOperationException($"Unknown Mod Type \"{modType.ToString()}\"");
        }

        return(mainAssets[modType]);
    }
示例#23
0
        public override IEnumerable <Mod> GetModsFor(ModType type)
        {
            switch (type)
            {
            case ModType.DifficultyReduction:
                return(new Mod[]
                {
                    new OsuModEasy(),
                    new OsuModNoFail(),
                    new OsuModHalfTime(),
                });

            case ModType.DifficultyIncrease:
                return(new Mod[]
                {
                    new OsuModHardRock(),
                    new MultiMod
                    {
                        Mods = new Mod[]
                        {
                            new OsuModSuddenDeath(),
                            new OsuModPerfect(),
                        },
                    },
                    new MultiMod
                    {
                        Mods = new Mod[]
                        {
                            new OsuModDoubleTime(),
                            new OsuModNightcore(),
                        },
                    },
                    new OsuModHidden(),
                    new OsuModFlashlight(),
                });

            case ModType.Special:
                return(new Mod[]
                {
                    new OsuModRelax(),
                    new OsuModAutopilot(),
                    new OsuModSpunOut(),
                    new MultiMod
                    {
                        Mods = new Mod[]
                        {
                            new OsuModAutoplay(),
                            new ModCinema(),
                        },
                    },
                    new OsuModTarget(),
                });

            default:
                return(new Mod[] { });
            }
        }
示例#24
0
        /// <summary>
        /// Called by parent class for drawing specific variables at top.
        /// Parent class should automatically check for when it is dirty.
        /// </summary>
        protected override void DrawChildInspector()
        {
            modType = (ModType)EditorGUILayout.EnumPopup("Mod Type", modType);

            if (modType == ModType.Set)
            {
                setWalkSpeed = EditorGUILayout.FloatField("Set Walk Speed", setWalkSpeed);
            }
        }
示例#25
0
        public TooManyMods(string[] list, ModType type = ModType.PC)
        {
            InitializeComponent();
            foreach (var file in list)
            {
                checkedListBox1.Items.Add(file, true);
            }

            label1.Text = label1.Text.Replace("{0}", type == ModType.PC ? "mods" : "texture mods");
        }
示例#26
0
    public void EquipMod(ModSpot spot, ModType type)
    {
        canActivate = false;
        Mod modToEquip = modInventory.GetMod(type, spot);

        if (modToEquip != null)
        {
            Attach(spot, modToEquip);
        }
    }
示例#27
0
文件: Items.cs 项目: Evad-lab/ServUOX
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);
            int v = reader.ReadInt();

            m_RefinementType = (RefinementType)reader.ReadInt();
            m_CraftType      = (RefinementCraftType)reader.ReadInt();
            m_SubCraftType   = (RefinementSubCraftType)reader.ReadInt();
            m_ModType        = (ModType)reader.ReadInt();
        }
示例#28
0
 private ModInfo(ModType type, string installFolder)
 {
     modType       = type;
     InstallFolder = installFolder;
     Name          = "Unknown Mod";
     Links         = new List <Link>();
     GameId        = new GameID();
     Developer     = "Unknown";
     Categories    = new List <string>();
 }
示例#29
0
文件: Items.cs 项目: Evad-lab/ServUOX
 public RefinementComponent(RefinementType type, RefinementCraftType craftType, ModType modType)
     : base(0)
 {
     m_RefinementType = type;
     m_CraftType      = craftType;
     GetSubCraftType();
     m_ModType = modType;
     GetItemID();
     GetHue();
 }
示例#30
0
 private ModInfo(ModType type, string installFolder)
 {
     modType       = type;
     InstallFolder = installFolder;
     Name          = "Unknown Mod";
     Links         = new ObservableCollection <Link>();
     GameId        = new GameID();
     Developer     = "Unknown";
     Categories    = new ComparableList <string>();
 }
示例#31
0
    public static string GetModsFolder(ModType modType)
    {
        var path = Path.Combine(GetModsfolderPath(), modType.ToString());

        if (!Directory.Exists(path))
        {
            Directory.CreateDirectory(path);
        }

        return(path);
    }
示例#32
0
        public override IEnumerable <Mod> GetModsFor(ModType type)
        {
            switch (type)
            {
            case ModType.Automation:
                return(new[] { new PippidonModAutoplay() });

            default:
                return(new Mod[] { null });
            }
        }
        /// <summary>
        /// The only constructor for the CrossLink object requires 1 or 2 peptides, the mass of the peptides, and the ModType of the cross-link.
        /// </summary>
        /// <param name="proteinId">The identifier of the protein of the cross-link.</param>
        /// <param name="peptideOne">The first peptide of the cross-link.</param>
        /// <param name="peptideTwo">The second peptide of the cross-link. Can be null if linking the first peptide to itself.</param>
        /// <param name="mass">The monoisotopic mass of the un-shifted cross-link, in daltons.</param>
        /// <param name="modType">The mod type of the cross link. See CrossLink.ModType for explaination of mod types.</param>
        public CrossLink(string proteinId, clsInSilicoDigest.PeptideInfoClass peptideOne, clsInSilicoDigest.PeptideInfoClass peptideTwo, double mass, ModType modType)
        {
            this.ProteinId = proteinId;
            this.PeptideOne = peptideOne;
            this.PeptideTwo = peptideTwo;
            this.Mass = mass;
            this.ModType = modType;

            this.MassShiftList = new List<double>();
            if (peptideOne != null) this.MassShiftList.Add(CrossLinkUtil.CalculateMassShift(peptideOne.SequenceOneLetter));
            if (peptideTwo != null) this.MassShiftList.Add(CrossLinkUtil.CalculateMassShift(peptideTwo.SequenceOneLetter));
        }
示例#34
0
        public static void ModValue(string value, ModType modType, ref WooState state)
        {
            /*Vector3 vec = new Vector3(0, 0, 0);
            if (_Value.Equals("x", StringComparison.InvariantCultureIgnoreCase))
                vec.x = _Number.GetNewNumber(state._X, state._Random);
            if (_Value.Equals("y", StringComparison.InvariantCultureIgnoreCase))
                vec.y = _Number.GetNewNumber(state._Y, state._Random);
            if (_Value.Equals("z", StringComparison.InvariantCultureIgnoreCase))
                vec.z = _Number.GetNewNumber(state._Z, state._Random);

            vec.x = vec.x * state._Scale.x;
            vec.y = vec.y * state._Scale.y;
            vec.z = vec.z * state._Scale.z;
            
            vec.Mul(state._Rotation);
            state._X += vec.x;
            state._Y += vec.y;
            state._Z += vec.z;

            if (_Value.Equals("rx", StringComparison.InvariantCultureIgnoreCase))
            {
                double delta = _Number.GetNewNumber(state._rX, state._Random);
                state._rX += delta;
                Matrix3 rotMatrix = new Matrix3();
                rotMatrix.MakeFromRPY(delta * 2 * 3.141592 / 360, 0, 0);
                rotMatrix.Mul(state._Rotation);
                state._Rotation = rotMatrix;
            }
            if (_Value.Equals("ry", StringComparison.InvariantCultureIgnoreCase))
            {
                double delta = _Number.GetNewNumber(state._rY, state._Random);
                state._rY += delta;
                Matrix3 rotMatrix = new Matrix3();
                rotMatrix.MakeFromRPY(0, delta * 2 * 3.141592 / 360, 0);
                rotMatrix.Mul(state._Rotation);
                state._Rotation = rotMatrix;
            } 
            if (_Value.Equals("rz", StringComparison.InvariantCultureIgnoreCase))
            {
                double delta = _Number.GetNewNumber(state._rZ, state._Random);
                state._rZ += delta;
                Matrix3 rotMatrix = new Matrix3();
                rotMatrix.MakeFromRPY(0, 0, delta * 2 * 3.141592 / 360);
                rotMatrix.Mul(state._Rotation);
                state._Rotation = rotMatrix;
            }

            if (_Value.Equals("diff", StringComparison.InvariantCultureIgnoreCase))
            {
                state._Diff._Red += _Number.GetNewNumber(state._Diff._Red, state._Random);
                state._Diff._Green += _Number2.GetNewNumber(state._Diff._Green, state._Random);
                state._Diff._Blue += _Number3.GetNewNumber(state._Diff._Blue, state._Random);
            }
            if (_Value.Equals("diffR", StringComparison.InvariantCultureIgnoreCase))
                state._Diff._Red += _Number.GetNewNumber(state._Diff._Red, state._Random);
            if (_Value.Equals("diffG", StringComparison.InvariantCultureIgnoreCase))
                state._Diff._Green += _Number.GetNewNumber(state._Diff._Green, state._Random);
            if (_Value.Equals("diffB", StringComparison.InvariantCultureIgnoreCase))
                state._Diff._Blue += _Number.GetNewNumber(state._Diff._Blue, state._Random);

            if (_Value.Equals("refl", StringComparison.InvariantCultureIgnoreCase))
            {
                state._Refl._Red += _Number.GetNewNumber(state._Refl._Red, state._Random);
                state._Refl._Green += _Number2.GetNewNumber(state._Refl._Green, state._Random);
                state._Refl._Blue += _Number3.GetNewNumber(state._Refl._Blue, state._Random);
            }
            if (_Value.Equals("reflR", StringComparison.InvariantCultureIgnoreCase))
                state._Refl._Red += _Number.GetNewNumber(state._Refl._Red, state._Random);
            if (_Value.Equals("reflG", StringComparison.InvariantCultureIgnoreCase))
                state._Refl._Green += _Number.GetNewNumber(state._Refl._Green, state._Random);
            if (_Value.Equals("reflB", StringComparison.InvariantCultureIgnoreCase))
                state._Refl._Blue += _Number.GetNewNumber(state._Refl._Blue, state._Random);

            if (_Value.Equals("emi", StringComparison.InvariantCultureIgnoreCase))
            {
                state._Emi._Red += _Number.GetNewNumber(state._Emi._Red, state._Random);
                state._Emi._Green += _Number2.GetNewNumber(state._Emi._Green, state._Random);
                state._Emi._Blue += _Number3.GetNewNumber(state._Emi._Blue, state._Random);
            }
            if (_Value.Equals("emiR", StringComparison.InvariantCultureIgnoreCase))
                state._Emi._Red += _Number.GetNewNumber(state._Emi._Red, state._Random);
            if (_Value.Equals("emiG", StringComparison.InvariantCultureIgnoreCase))
                state._Emi._Green += _Number.GetNewNumber(state._Emi._Green, state._Random);
            if (_Value.Equals("emiB", StringComparison.InvariantCultureIgnoreCase))
                state._Emi._Blue += _Number.GetNewNumber(state._Emi._Blue, state._Random);

            if (_Value.Equals("spec", StringComparison.InvariantCultureIgnoreCase))
            {
                state._Spec._Red += _Number.GetNewNumber(state._Spec._Red, state._Random);
                state._Spec._Green += _Number2.GetNewNumber(state._Spec._Green, state._Random);
                state._Spec._Blue += _Number3.GetNewNumber(state._Spec._Blue, state._Random);
            }
            if (_Value.Equals("specR", StringComparison.InvariantCultureIgnoreCase))
                state._Spec._Red += _Number.GetNewNumber(state._Spec._Red, state._Random);
            if (_Value.Equals("specG", StringComparison.InvariantCultureIgnoreCase))
                state._Spec._Green += _Number.GetNewNumber(state._Spec._Green, state._Random);
            if (_Value.Equals("specB", StringComparison.InvariantCultureIgnoreCase))
                state._Spec._Blue += _Number.GetNewNumber(state._Spec._Blue, state._Random);

            if (_Value.Equals("power", StringComparison.InvariantCultureIgnoreCase))
                state._Power += (float)_Number.GetNewNumber((double)state._Power, state._Random);

            if (_Value.Equals("scale", StringComparison.InvariantCultureIgnoreCase))
            {
                state._Scale.x += _Number.GetNewNumber(state._Scale.x, state._Random);
                state._Scale.y += _Number2.GetNewNumber(state._Scale.y, state._Random);
                state._Scale.z += _Number3.GetNewNumber(state._Scale.z, state._Random);
            }
            if (_Value.Equals("scaleX", StringComparison.InvariantCultureIgnoreCase))
                state._Scale.x += _Number.GetNewNumber(state._Scale.x, state._Random);
            if (_Value.Equals("scaleY", StringComparison.InvariantCultureIgnoreCase))
                state._Scale.y += _Number.GetNewNumber(state._Scale.y, state._Random);
            if (_Value.Equals("scaleZ", StringComparison.InvariantCultureIgnoreCase))
                state._Scale.z += _Number.GetNewNumber(state._Scale.z, state._Random);

            if (_Value.Equals("recursions", StringComparison.InvariantCultureIgnoreCase))
                state._Recursions += (int)(0.5+_Number.GetNewNumber((double)state._Recursions, state._Random));
      */  }
示例#35
0
文件: Items.cs 项目: Crome696/ServUO
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);
            int v = reader.ReadInt();

            m_RefinementType = (RefinementType)reader.ReadInt();
            m_CraftType = (RefinementCraftType)reader.ReadInt();
            m_SubCraftType = (RefinementSubCraftType)reader.ReadInt();
            m_ModType = (ModType)reader.ReadInt();
        }
示例#36
0
文件: Items.cs 项目: Crome696/ServUO
        public RefinementItem(RefinementType type, RefinementCraftType craftType, RefinementSubCraftType srtype, ModType modType)
            : base(0)
        {
            m_RefinementType = type;
            m_CraftType = craftType;
            m_SubCraftType = srtype;
            ModType = modType;
            GetItemID();
            GetHue();
            ApplyModAmount();

            m_Entry = new ModEntry(m_ModAmount);

            m_CheckBonus = false;
        }
示例#37
0
文件: Items.cs 项目: Crome696/ServUO
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);
            int v = reader.ReadInt();

            m_RefinementType = (RefinementType)reader.ReadInt();
            m_CraftType = (RefinementCraftType)reader.ReadInt();
            m_SubCraftType = (RefinementSubCraftType)reader.ReadInt();
            m_ModType = (ModType)reader.ReadInt();
            m_ModAmount = reader.ReadInt();
            m_CheckBonus = reader.ReadBool();

            m_Entry = new ModEntry(reader);
        }
示例#38
0
        protected TickAttribute(Attributes.Stats attribute, ModType modType, float magnitude, short sign)
            : base()
        {
            _attribute = attribute;
            _modType = modType;

            if (magnitude > 0)
            {
                _magnitude = magnitude;
            }

            else
            {
                _magnitude = 0;
                throw new ArgumentOutOfRangeException("You may only create an AttributeModification obect with a positive magnitude.");
            }

            _sign = sign;
        }
示例#39
0
 /// <summary>
 /// Define a Tick module that heals the target for an amount every second. If ModType is Percentage, the target
 /// will be healed for the given percentage of its health every second for the duration of the effect. If ModType is Value,
 /// the target will be healed by some function of the given magnitude and the caster's ability to heal.
 /// </summary>
 /// <param name="modType">The type of healing to be done.</param>
 /// <param name="magnitude">The percentage of health to heal by if ModType == Percentage  where 0.03 = 3%, or the amount of raw 
 /// healing to be done if ModType == Value, each second. Must be positive. </param>
 public HoT(ModType modType, float magnitude)
     : base(Attributes.Stats.HEALTH, modType, magnitude, 1)
 {
 }
示例#40
0
文件: Items.cs 项目: Crome696/ServUO
 public RefinementComponent(RefinementType type, RefinementCraftType craftType, ModType modType)
     : base(0)
 {
     m_RefinementType = type;
     m_CraftType = craftType;
     GetSubCraftType();
     m_ModType = modType;
     GetItemID();
     GetHue();
 }
示例#41
0
 public void AddMod(ModType modType)
 {
     modTypes.Add(modType);
 }
        public void AddModification(StaticMod mod, ModType type)
        {
            if (mod == null)
                return;

            ImportPeptideSearch.UserDefinedTypedMods.Add(mod);

            PeptideSettings newPeptideSettings = SkylineWindow.Document.Settings.PeptideSettings;
            var newMods = new List<StaticMod>(
                    (type == ModType.structural ? newPeptideSettings.Modifications.StaticModifications : newPeptideSettings.Modifications.HeavyModifications)
                ) { mod };
            newPeptideSettings = (type == ModType.structural)
                                     ? newPeptideSettings.ChangeModifications(newPeptideSettings.Modifications.ChangeStaticModifications(newMods))
                                     : newPeptideSettings.ChangeModifications(newPeptideSettings.Modifications.ChangeHeavyModifications(newMods));

            SkylineWindow.ChangeSettings(SkylineWindow.Document.Settings.ChangePeptideSettings(newPeptideSettings), true,
                string.Format(Resources.MatchModificationsControl_AddModification_Add__0__modification__1_, type, mod.Name));
            SkylineWindow.Document.Settings.UpdateDefaultModifications(false);

            FillLists(SkylineWindow.Document);
        }
        public void AddModification(ModType type)
        {
            var newMod = (type == ModType.structural)
                             ? Settings.Default.StaticModList.EditItem(this, null, Settings.Default.StaticModList, null)
                             : Settings.Default.HeavyModList.EditItem(this, null, Settings.Default.HeavyModList, null);

            AddModification(newMod, type);
        }