예제 #1
0
 /// <summary>
 /// Crée le passif du type donné ayant le niveau donné.
 /// </summary>
 public static StateAlterationModel CreatePassive(StateAlterationType type, int level, int durationLevel)
 {
     return(new StateAlterationModel()
     {
         Type = type,
         FlatValue = PassiveEquipFactory.BalanceSystems[type][level],
         BaseDuration = GameServer.GetScene().Constants.Equip.EnchantOnHitEffectsDuration[durationLevel]
     });
 }
예제 #2
0
 /// <summary>
 /// Supprime toutes les altérations du type donné.
 /// </summary>
 /// <param name="type"></param>
 public void EndAlterations(StateAlterationType type)
 {
     foreach (StateAlteration alt in this)
     {
         if (alt.Model.Type == type)
         {
             alt.EndNow();
         }
     }
 }
예제 #3
0
        /// <summary>
        /// Retourne la liste des altérations d'état ayant le type donné.
        /// </summary>
        public StateAlterationCollection GetInteractionsByType(StateAlterationType type)
        {
            StateAlterationCollection alterations = new StateAlterationCollection();

            foreach (StateAlteration alteration in this)
            {
                if ((alteration.Model.Type & type) == type)
                {
                    alterations.Add(alteration);
                }
            }
            return(alterations);
        }
        public static StateAlterationModelView Deserialize(System.IO.StreamReader input)
        {
            StateAlterationModelView _obj = new StateAlterationModelView();
            // Type
            StateAlterationType _obj_Type = (StateAlterationType)Int32.Parse(input.ReadLine());

            _obj.Type = (StateAlterationType)_obj_Type;
            // BaseDuration
            float _obj_BaseDuration = Single.Parse(input.ReadLine());

            _obj.BaseDuration = (float)_obj_BaseDuration;
            // DashGoThroughWall
            bool _obj_DashGoThroughWall = Int32.Parse(input.ReadLine()) == 0 ? false : true;

            _obj.DashGoThroughWall = (bool)_obj_DashGoThroughWall;
            // DashDirType
            DashDirectionType _obj_DashDirType = (DashDirectionType)Int32.Parse(input.ReadLine());

            _obj.DashDirType = (DashDirectionType)_obj_DashDirType;
            // FlatValue
            float _obj_FlatValue = Single.Parse(input.ReadLine());

            _obj.FlatValue = (float)_obj_FlatValue;
            // SourcePercentADValue
            float _obj_SourcePercentADValue = Single.Parse(input.ReadLine());

            _obj.SourcePercentADValue = (float)_obj_SourcePercentADValue;
            // SourcePercentHPValue
            float _obj_SourcePercentHPValue = Single.Parse(input.ReadLine());

            _obj.SourcePercentHPValue = (float)_obj_SourcePercentHPValue;
            // SourcePercentMaxHPValue
            float _obj_SourcePercentMaxHPValue = Single.Parse(input.ReadLine());

            _obj.SourcePercentMaxHPValue = (float)_obj_SourcePercentMaxHPValue;
            // SourcePercentArmorValue
            float _obj_SourcePercentArmorValue = Single.Parse(input.ReadLine());

            _obj.SourcePercentArmorValue = (float)_obj_SourcePercentArmorValue;
            // SourcePercentAPValue
            float _obj_SourcePercentAPValue = Single.Parse(input.ReadLine());

            _obj.SourcePercentAPValue = (float)_obj_SourcePercentAPValue;
            // SourcePercentRMValue
            float _obj_SourcePercentRMValue = Single.Parse(input.ReadLine());

            _obj.SourcePercentRMValue = (float)_obj_SourcePercentRMValue;
            // DestPercentADValue
            float _obj_DestPercentADValue = Single.Parse(input.ReadLine());

            _obj.DestPercentADValue = (float)_obj_DestPercentADValue;
            // DestPercentHPValue
            float _obj_DestPercentHPValue = Single.Parse(input.ReadLine());

            _obj.DestPercentHPValue = (float)_obj_DestPercentHPValue;
            // DestPercentMaxHPValue
            float _obj_DestPercentMaxHPValue = Single.Parse(input.ReadLine());

            _obj.DestPercentMaxHPValue = (float)_obj_DestPercentMaxHPValue;
            // DestPercentArmorValue
            float _obj_DestPercentArmorValue = Single.Parse(input.ReadLine());

            _obj.DestPercentArmorValue = (float)_obj_DestPercentArmorValue;
            // DestPercentAPValue
            float _obj_DestPercentAPValue = Single.Parse(input.ReadLine());

            _obj.DestPercentAPValue = (float)_obj_DestPercentAPValue;
            // DestPercentRMValue
            float _obj_DestPercentRMValue = Single.Parse(input.ReadLine());

            _obj.DestPercentRMValue = (float)_obj_DestPercentRMValue;
            // StructureBonus
            float _obj_StructureBonus = Single.Parse(input.ReadLine());

            _obj.StructureBonus = (float)_obj_StructureBonus;
            // MonsterBonus
            float _obj_MonsterBonus = Single.Parse(input.ReadLine());

            _obj.MonsterBonus = (float)_obj_MonsterBonus;
            // VirusBonus
            float _obj_VirusBonus = Single.Parse(input.ReadLine());

            _obj.VirusBonus = (float)_obj_VirusBonus;
            return(_obj);
        }
 public Passive(StateAlterationType type, int[] levels)
 {
     Type   = type;
     Levels = levels;
 }