Example #1
0
 public void Deserialize(JSON_TrickParam json)
 {
     if (json == null)
     {
         return;
     }
     this.mIname         = json.iname;
     this.mName          = json.name;
     this.mExpr          = json.expr;
     this.mDamageType    = (eTrickDamageType)json.dmg_type;
     this.mDamageVal     = (OInt)json.dmg_val;
     this.mCalcType      = (SkillParamCalcTypes)json.calc;
     this.mElem          = (EElement)json.elem;
     this.mAttackDetail  = (AttackDetailTypes)json.atk_det;
     this.mBuffId        = json.buff;
     this.mCondId        = json.cond;
     this.mKnockBackRate = (OInt)json.kb_rate;
     this.mKnockBackVal  = (OInt)json.kb_val;
     this.mTarget        = (ESkillTarget)json.target;
     this.mVisualType    = (eTrickVisualType)json.visual;
     this.mActionCount   = (OInt)json.count;
     this.mValidClock    = (OInt)json.clock;
     this.mIsNoOverWrite = (OBool)(json.is_no_ow != 0);
     this.mMarkerName    = json.marker;
     this.mEffectName    = json.effect;
     this.mEffTarget     = (ESkillTarget)json.eff_target;
     this.mEffShape      = (ESelectType)json.eff_shape;
     this.mEffScope      = (OInt)json.eff_scope;
     this.mEffHeight     = (OInt)json.eff_height;
 }
Example #2
0
 private BuffMethodTypes GetBuffMethodType(BuffTypes buff, SkillParamCalcTypes calc)
 {
     if (calc != SkillParamCalcTypes.Scale)
     {
         return(BuffMethodTypes.Add);
     }
     return(buff == BuffTypes.Buff ? BuffMethodTypes.Highest : BuffMethodTypes.Lowest);
 }
Example #3
0
 private BuffMethodTypes GetBuffMethodType(BuffTypes buff, SkillParamCalcTypes calc)
 {
     if (this.Timing == ESkillTiming.Passive || calc != SkillParamCalcTypes.Scale)
     {
         return(BuffMethodTypes.Add);
     }
     return(buff == BuffTypes.Buff ? BuffMethodTypes.Highest : BuffMethodTypes.Lowest);
 }
Example #4
0
 public bool CheckBuffCalcType(BuffTypes buff, SkillParamCalcTypes calc)
 {
     for (int index = 0; index < this.targets.Count; ++index)
     {
         if (buff == this.targets[index].buffType && calc == this.targets[index].calcType)
         {
             return(true);
         }
     }
     return(false);
 }
Example #5
0
 public bool CheckBuffCalcType(BuffTypes buff, SkillParamCalcTypes calc, bool is_negative_value_is_buff)
 {
     for (int index = 0; index < this.targets.Count; ++index)
     {
         BuffEffect.BuffTarget target = this.targets[index];
         if (buff == target.buffType && calc == target.calcType && BuffEffectParam.IsNegativeValueIsBuff(target.paramType) == is_negative_value_is_buff)
         {
             return(true);
         }
     }
     return(false);
 }
Example #6
0
 private void InternalBuffSkill(BuffEffect effect, BuffTypes buffType, SkillParamCalcTypes calcType, BaseStatus status)
 {
     for (int index = 0; index < effect.targets.Count; ++index)
     {
         BuffEffect.BuffTarget target = effect.targets[index];
         if (target != null && target.buffType == buffType && target.calcType == calcType)
         {
             BuffMethodTypes buffMethodType = this.GetBuffMethodType(target.buffType, calcType);
             ParamTypes      paramType      = target.paramType;
             int             num            = (int)target.value;
             effect.SetBuffValues(paramType, buffMethodType, ref status, num);
         }
     }
 }
Example #7
0
 public void CalcBuffStatus(ref BaseStatus status, BuffTypes buffType, SkillParamCalcTypes calcType)
 {
     for (int index = 0; index < this.targets.Count; ++index)
     {
         BuffEffect.BuffTarget target = this.targets[index];
         if (target.buffType == buffType && target.calcType == calcType)
         {
             BuffMethodTypes buffMethodType = this.GetBuffMethodType(target.buffType, calcType);
             ParamTypes      paramType      = target.paramType;
             int             num            = (int)target.value;
             this.SetBuffValues(paramType, buffMethodType, ref status, num);
         }
     }
 }
Example #8
0
        public static int CalcSkillEffectValue(SkillParamCalcTypes calctype, int skillval, int target)
        {
            switch (calctype)
            {
            case SkillParamCalcTypes.Add:
                return(target + skillval);

            case SkillParamCalcTypes.Scale:
                return(target + target * skillval / 100);

            default:
                return(skillval);
            }
        }
Example #9
0
        public void CalcBuffStatus(ref BaseStatus status, EElement element, BuffTypes buffType, bool is_check_negative_value, bool is_negative_value_is_buff, SkillParamCalcTypes calcType, int up_count = 0)
        {
            for (int index = 0; index < this.targets.Count; ++index)
            {
                BuffEffect.BuffTarget target = this.targets[index];
                if (target.buffType == buffType && (!is_check_negative_value || BuffEffectParam.IsNegativeValueIsBuff(target.paramType) == is_negative_value_is_buff) && target.calcType == calcType)
                {
                    if (element != EElement.None)
                    {
                        bool flag = false;
                        switch (target.paramType)
                        {
                        case ParamTypes.Assist_Fire:
                        case ParamTypes.UnitDefenseFire:
                            flag = element != EElement.Fire;
                            break;

                        case ParamTypes.Assist_Water:
                        case ParamTypes.UnitDefenseWater:
                            flag = element != EElement.Water;
                            break;

                        case ParamTypes.Assist_Wind:
                        case ParamTypes.UnitDefenseWind:
                            flag = element != EElement.Wind;
                            break;

                        case ParamTypes.Assist_Thunder:
                        case ParamTypes.UnitDefenseThunder:
                            flag = element != EElement.Thunder;
                            break;

                        case ParamTypes.Assist_Shine:
                        case ParamTypes.UnitDefenseShine:
                            flag = element != EElement.Shine;
                            break;

                        case ParamTypes.Assist_Dark:
                        case ParamTypes.UnitDefenseDark:
                            flag = element != EElement.Dark;
                            break;
                        }
                        if (flag)
                        {
                            continue;
                        }
                    }
                    BuffMethodTypes buffMethodType = this.GetBuffMethodType(target.buffType, calcType);
                    ParamTypes      paramType      = target.paramType;
                    int             val1           = (int)target.value;
                    if ((bool)this.param.mIsUpBuff)
                    {
                        val1 = (int)target.value_one * up_count;
                        if (val1 > 0)
                        {
                            val1 = Math.Min(val1, (int)target.value);
                        }
                        else if (val1 < 0)
                        {
                            val1 = Math.Max(val1, (int)target.value);
                        }
                    }
                    BuffEffect.SetBuffValues(paramType, buffMethodType, ref status, val1);
                }
            }
        }
Example #10
0
        private void InternalBuffSkill(BuffEffect effect, EElement element, BuffTypes buffType, bool is_check_negative_value, bool is_negative_value_is_buff, SkillParamCalcTypes calcType, BaseStatus status, List <BuffEffect.BuffValues> list = null)
        {
            for (int index1 = 0; index1 < effect.targets.Count; ++index1)
            {
                BuffEffect.BuffTarget target = effect.targets[index1];
                if (target != null && target.buffType == buffType && (!is_check_negative_value || BuffEffectParam.IsNegativeValueIsBuff(target.paramType) == is_negative_value_is_buff) && target.calcType == calcType)
                {
                    if (element != EElement.None)
                    {
                        bool flag = false;
                        switch (target.paramType)
                        {
                        case ParamTypes.Assist_Fire:
                        case ParamTypes.UnitDefenseFire:
                            flag = element != EElement.Fire;
                            break;

                        case ParamTypes.Assist_Water:
                        case ParamTypes.UnitDefenseWater:
                            flag = element != EElement.Water;
                            break;

                        case ParamTypes.Assist_Wind:
                        case ParamTypes.UnitDefenseWind:
                            flag = element != EElement.Wind;
                            break;

                        case ParamTypes.Assist_Thunder:
                        case ParamTypes.UnitDefenseThunder:
                            flag = element != EElement.Thunder;
                            break;

                        case ParamTypes.Assist_Shine:
                        case ParamTypes.UnitDefenseShine:
                            flag = element != EElement.Shine;
                            break;

                        case ParamTypes.Assist_Dark:
                        case ParamTypes.UnitDefenseDark:
                            flag = element != EElement.Dark;
                            break;
                        }
                        if (flag)
                        {
                            continue;
                        }
                    }
                    BuffMethodTypes buffMethodType = this.GetBuffMethodType(target.buffType, calcType);
                    ParamTypes      paramType      = target.paramType;
                    int             num            = (int)target.value;
                    if ((bool)effect.param.mIsUpBuff)
                    {
                        num = 0;
                    }
                    if (list == null)
                    {
                        BuffEffect.SetBuffValues(paramType, buffMethodType, ref status, num);
                    }
                    else
                    {
                        bool flag = true;
                        for (int index2 = 0; index2 < list.Count; ++index2)
                        {
                            BuffEffect.BuffValues buffValues = list[index2];
                            if (buffValues.param_type == paramType && buffValues.method_type == buffMethodType)
                            {
                                buffValues.value += num;
                                list[index2]      = buffValues;
                                flag              = false;
                                break;
                            }
                        }
                        if (flag)
                        {
                            list.Add(new BuffEffect.BuffValues()
                            {
                                param_type  = paramType,
                                method_type = buffMethodType,
                                value       = num
                            });
                        }
                    }
                }
            }
        }
Example #11
0
        public BuffAttachment MakeBuff(Unit gimmick, Unit target)
        {
            BuffAttachment buffAttachment = new BuffAttachment();

            switch (this.GimmickType)
            {
            case EEventGimmick.AtkUp:
            case EEventGimmick.DefUp:
            case EEventGimmick.MagUp:
            case EEventGimmick.MndUp:
            case EEventGimmick.RecUp:
            case EEventGimmick.SpdUp:
            case EEventGimmick.CriUp:
            case EEventGimmick.LukUp:
            case EEventGimmick.MovUp:
                FixParam            fixParam            = MonoSingleton <GameManager> .Instance.MasterParam.FixParam;
                int                 gemsBuffValue       = (int)fixParam.GemsBuffValue;
                int                 gemsBuffTurn        = (int)fixParam.GemsBuffTurn;
                SkillParamCalcTypes skillParamCalcTypes = SkillParamCalcTypes.Scale;
                if (this.GimmickType == EEventGimmick.AtkUp)
                {
                    buffAttachment.status.param.atk = (OShort)gemsBuffValue;
                }
                if (this.GimmickType == EEventGimmick.DefUp)
                {
                    buffAttachment.status.param.def = (OShort)gemsBuffValue;
                }
                if (this.GimmickType == EEventGimmick.MagUp)
                {
                    buffAttachment.status.param.mag = (OShort)gemsBuffValue;
                }
                if (this.GimmickType == EEventGimmick.MndUp)
                {
                    buffAttachment.status.param.mnd = (OShort)gemsBuffValue;
                }
                if (this.GimmickType == EEventGimmick.RecUp)
                {
                    buffAttachment.status.param.rec = (OShort)gemsBuffValue;
                }
                if (this.GimmickType == EEventGimmick.SpdUp)
                {
                    buffAttachment.status.param.spd = (OShort)gemsBuffValue;
                }
                if (this.GimmickType == EEventGimmick.CriUp)
                {
                    buffAttachment.status.param.cri = (OShort)gemsBuffValue;
                }
                if (this.GimmickType == EEventGimmick.LukUp)
                {
                    buffAttachment.status.param.luk = (OShort)gemsBuffValue;
                }
                if (this.GimmickType == EEventGimmick.MovUp)
                {
                    buffAttachment.status.param.mov = (OShort)2;
                    skillParamCalcTypes             = SkillParamCalcTypes.Add;
                }
                buffAttachment.user         = gimmick;
                buffAttachment.BuffType     = BuffTypes.Buff;
                buffAttachment.CalcType     = skillParamCalcTypes;
                buffAttachment.CheckTarget  = target;
                buffAttachment.CheckTiming  = EffectCheckTimings.ActionStart;
                buffAttachment.UseCondition = ESkillCondition.None;
                buffAttachment.IsPassive    = (OBool)false;
                buffAttachment.turn         = (OInt)gemsBuffTurn;
                break;
            }
            return(buffAttachment);
        }
Example #12
0
        private BuffAttachment createBuffAttachment(Unit target, BuffTypes buff_type, bool is_negative_value_is_buff, SkillParamCalcTypes calc_type, BaseStatus status, EffectCheckTimings chk_timing)
        {
            if (this.mBuffEffect == null)
            {
                return((BuffAttachment)null);
            }
            BuffAttachment buffAttachment = new BuffAttachment(this.mBuffEffect.param);

            buffAttachment.user                  = this.mCreateUnit;
            buffAttachment.skill                 = (SkillData)null;
            buffAttachment.skilltarget           = SkillEffectTargets.Self;
            buffAttachment.IsPassive             = (OBool)false;
            buffAttachment.CheckTarget           = (Unit)null;
            buffAttachment.DuplicateCount        = 0;
            buffAttachment.CheckTiming           = chk_timing;
            buffAttachment.turn                  = (OInt)1;
            buffAttachment.BuffType              = buff_type;
            buffAttachment.IsNegativeValueIsBuff = is_negative_value_is_buff;
            buffAttachment.CalcType              = calc_type;
            buffAttachment.UseCondition          = this.mBuffEffect.param.cond;
            status.CopyTo(buffAttachment.status);
            return(buffAttachment);
        }
Example #13
0
        private BuffAttachment createBuffAttachment(Unit target, BuffEffect effect, BuffTypes buff_type, SkillParamCalcTypes calc_type, BaseStatus status)
        {
            if (effect == null)
            {
                return((BuffAttachment)null);
            }
            BuffAttachment buffAttachment = new BuffAttachment(effect.param);

            buffAttachment.user           = this.mModifyUnit;
            buffAttachment.skill          = (SkillData)null;
            buffAttachment.skilltarget    = SkillEffectTargets.Self;
            buffAttachment.IsPassive      = (OBool)true;
            buffAttachment.CheckTarget    = (Unit)null;
            buffAttachment.DuplicateCount = 0;
            buffAttachment.CheckTiming    = effect.param.chk_timing;
            buffAttachment.turn           = effect.param.turn;
            buffAttachment.BuffType       = buff_type;
            buffAttachment.CalcType       = calc_type;
            buffAttachment.UseCondition   = ESkillCondition.Weather;
            status.CopyTo(buffAttachment.status);
            return(buffAttachment);
        }
Example #14
0
        public void ExecuteGimmickEffect(Unit gimmick, Unit target, LogMapEvent log = null)
        {
            switch (this.GimmickType)
            {
            case EEventGimmick.Heal:
                int hp  = (int)target.MaximumStatus.param.hp;
                int num = Math.Min(hp * this.IntValue / 100, hp - (int)target.CurrentStatus.param.hp);
                target.Heal(num);
                if (log == null)
                {
                    break;
                }
                log.heal = num;
                break;

            case EEventGimmick.AtkUp:
            case EEventGimmick.DefUp:
            case EEventGimmick.MagUp:
            case EEventGimmick.MndUp:
            case EEventGimmick.RecUp:
            case EEventGimmick.SpdUp:
            case EEventGimmick.CriUp:
            case EEventGimmick.LukUp:
            case EEventGimmick.MovUp:
                BuffAttachment      buff                = new BuffAttachment();
                FixParam            fixParam            = MonoSingleton <GameManager> .Instance.MasterParam.FixParam;
                int                 gemsBuffValue       = (int)fixParam.GemsBuffValue;
                int                 gemsBuffTurn        = (int)fixParam.GemsBuffTurn;
                SkillParamCalcTypes skillParamCalcTypes = SkillParamCalcTypes.Scale;
                if (this.GimmickType == EEventGimmick.AtkUp)
                {
                    buff.status.param.atk = (OShort)gemsBuffValue;
                }
                if (this.GimmickType == EEventGimmick.DefUp)
                {
                    buff.status.param.def = (OShort)gemsBuffValue;
                }
                if (this.GimmickType == EEventGimmick.MagUp)
                {
                    buff.status.param.mag = (OShort)gemsBuffValue;
                }
                if (this.GimmickType == EEventGimmick.MndUp)
                {
                    buff.status.param.mnd = (OShort)gemsBuffValue;
                }
                if (this.GimmickType == EEventGimmick.RecUp)
                {
                    buff.status.param.rec = (OShort)gemsBuffValue;
                }
                if (this.GimmickType == EEventGimmick.SpdUp)
                {
                    buff.status.param.spd = (OShort)gemsBuffValue;
                }
                if (this.GimmickType == EEventGimmick.CriUp)
                {
                    buff.status.param.cri = (OShort)gemsBuffValue;
                }
                if (this.GimmickType == EEventGimmick.LukUp)
                {
                    buff.status.param.luk = (OShort)gemsBuffValue;
                }
                if (this.GimmickType == EEventGimmick.MovUp)
                {
                    buff.status.param.mov = (OShort)2;
                    skillParamCalcTypes   = SkillParamCalcTypes.Add;
                }
                buff.user         = gimmick;
                buff.BuffType     = BuffTypes.Buff;
                buff.CalcType     = skillParamCalcTypes;
                buff.CheckTarget  = target;
                buff.CheckTiming  = EffectCheckTimings.ActionStart;
                buff.UseCondition = ESkillCondition.None;
                buff.IsPassive    = (OBool)false;
                buff.turn         = (OInt)gemsBuffTurn;
                target.SetBuffAttachment(buff, false);
                if (log == null)
                {
                    break;
                }
                BattleCore.SetBuffBits(buff.status, ref log.buff, ref log.debuff);
                break;
            }
        }
Example #15
0
        public bool Deserialize(JSON_SkillParam json)
        {
            if (json == null)
            {
                return(false);
            }
            this.iname               = json.iname;
            this.name                = json.name;
            this.expr                = json.expr;
            this.motion              = json.motnm;
            this.effect              = json.effnm;
            this.defend_effect       = json.effdef;
            this.weapon              = json.weapon;
            this.tokkou              = json.tktag;
            this.tk_rate             = json.tkrate;
            this.type                = (ESkillType)json.type;
            this.timing              = (ESkillTiming)json.timing;
            this.condition           = (ESkillCondition)json.cond;
            this.target              = (ESkillTarget)json.target;
            this.line_type           = (ELineType)json.line;
            this.lvcap               = (OInt)json.cap;
            this.cost                = (OInt)json.cost;
            this.count               = (OInt)json.count;
            this.rate                = (OInt)json.rate;
            this.select_range        = (ESelectType)json.sran;
            this.range_min           = (OInt)json.rangemin;
            this.range_max           = (OInt)json.range;
            this.select_scope        = (ESelectType)json.ssco;
            this.scope               = (OInt)json.scope;
            this.effect_height       = (OInt)json.eff_h;
            this.back_defrate        = (OInt)json.bdb;
            this.side_defrate        = (OInt)json.sdb;
            this.ignore_defense_rate = (OInt)json.idr;
            this.job                  = json.job;
            this.SceneName            = json.scn;
            this.ComboNum             = (OInt)json.combo_num;
            this.ComboDamageRate      = (OInt)(100 - Math.Abs(json.combo_rate));
            this.IsCritical           = (OBool)(json.is_cri != 0);
            this.JewelDamageType      = (JewelDamageTypes)json.jdtype;
            this.JewelDamageValue     = (OInt)json.jdv;
            this.IsJewelAbsorb        = (OBool)(json.jdabs != 0);
            this.DuplicateCount       = (OInt)json.dupli;
            this.CollaboMainId        = json.cs_main_id;
            this.CollaboHeight        = (OInt)json.cs_height;
            this.KnockBackRate        = (OInt)json.kb_rate;
            this.KnockBackVal         = (OInt)json.kb_val;
            this.KnockBackDir         = (eKnockBackDir)json.kb_dir;
            this.KnockBackDs          = (eKnockBackDs)json.kb_ds;
            this.DamageDispType       = (eDamageDispType)json.dmg_dt;
            this.ReplaceTargetIdLists = (List <string>)null;
            if (json.rp_tgt_ids != null)
            {
                this.ReplaceTargetIdLists = new List <string>();
                foreach (string rpTgtId in json.rp_tgt_ids)
                {
                    this.ReplaceTargetIdLists.Add(rpTgtId);
                }
            }
            this.ReplaceChangeIdLists = (List <string>)null;
            if (json.rp_chg_ids != null && this.ReplaceTargetIdLists != null)
            {
                this.ReplaceChangeIdLists = new List <string>();
                foreach (string rpChgId in json.rp_chg_ids)
                {
                    this.ReplaceChangeIdLists.Add(rpChgId);
                }
            }
            if (this.ReplaceTargetIdLists != null && this.ReplaceChangeIdLists != null && this.ReplaceTargetIdLists.Count != this.ReplaceChangeIdLists.Count)
            {
                this.ReplaceTargetIdLists.Clear();
                this.ReplaceChangeIdLists.Clear();
            }
            this.AbilityReplaceTargetIdLists = (List <string>)null;
            if (json.ab_rp_tgt_ids != null)
            {
                this.AbilityReplaceTargetIdLists = new List <string>();
                foreach (string abRpTgtId in json.ab_rp_tgt_ids)
                {
                    this.AbilityReplaceTargetIdLists.Add(abRpTgtId);
                }
            }
            this.AbilityReplaceChangeIdLists = (List <string>)null;
            if (json.ab_rp_chg_ids != null && this.AbilityReplaceTargetIdLists != null)
            {
                this.AbilityReplaceChangeIdLists = new List <string>();
                foreach (string abRpChgId in json.ab_rp_chg_ids)
                {
                    this.AbilityReplaceChangeIdLists.Add(abRpChgId);
                }
            }
            if (this.AbilityReplaceTargetIdLists != null && this.AbilityReplaceChangeIdLists != null && this.AbilityReplaceTargetIdLists.Count != this.AbilityReplaceChangeIdLists.Count)
            {
                this.AbilityReplaceTargetIdLists.Clear();
                this.AbilityReplaceChangeIdLists.Clear();
            }
            this.CollaboVoiceId             = json.cs_voice;
            this.CollaboVoicePlayDelayFrame = json.cs_vp_df;
            this.TeleportType           = (eTeleportType)json.tl_type;
            this.TeleportTarget         = (ESkillTarget)json.tl_target;
            this.TeleportHeight         = json.tl_height;
            this.TeleportIsMove         = json.tl_is_mov != 0;
            this.TrickId                = json.tr_id;
            this.TrickSetType           = (eTrickSetType)json.tr_set;
            this.BreakObjId             = json.bo_id;
            this.MapEffectDesc          = json.me_desc;
            this.WeatherRate            = json.wth_rate;
            this.WeatherId              = json.wth_id;
            this.ElementSpcAtkRate      = json.elem_tk;
            this.MaxDamageValue         = json.max_dmg;
            this.CutInConceptCardId     = json.ci_cc_id;
            this.JudgeHpVal             = json.jhp_val;
            this.JudgeHpCalc            = (SkillParamCalcTypes)json.jhp_calc;
            this.AcFromAbilId           = json.ac_fr_ab_id;
            this.AcToAbilId             = json.ac_to_ab_id;
            this.AcTurn                 = json.ac_turn;
            this.EffectHitTargetNumRate = (OInt)json.eff_htnrate;
            this.AbsorbAndGive          = (eAbsorbAndGive)json.aag;
            this.TargetEx               = (eSkillTargetEx)json.target_ex;
            this.JumpSpcAtkRate         = json.jmp_tk;
            this.flags = (SkillFlags)0;
            if (json.cutin != 0)
            {
                this.flags |= SkillFlags.ExecuteCutin;
            }
            if (json.isbtl != 0)
            {
                this.flags |= SkillFlags.ExecuteInBattle;
            }
            if (json.chran != 0)
            {
                this.flags |= SkillFlags.EnableChangeRange;
            }
            if (json.sonoba != 0)
            {
                this.flags |= SkillFlags.SelfTargetSelect;
            }
            if (json.pierce != 0)
            {
                this.flags |= SkillFlags.PierceAttack;
            }
            if (json.hbonus != 0)
            {
                this.flags |= SkillFlags.EnableHeightRangeBonus;
            }
            if (json.ehpa != 0)
            {
                this.flags |= SkillFlags.EnableHeightParamAdjust;
            }
            if (json.utgt != 0)
            {
                this.flags |= SkillFlags.EnableUnitLockTarget;
            }
            if (json.ctbreak != 0)
            {
                this.flags |= SkillFlags.CastBreak;
            }
            if (json.mpatk != 0)
            {
                this.flags |= SkillFlags.JewelAttack;
            }
            if (json.fhit != 0)
            {
                this.flags |= SkillFlags.ForceHit;
            }
            if (json.suicide != 0)
            {
                this.flags |= SkillFlags.Suicide;
            }
            if (json.sub_actuate != 0)
            {
                this.flags |= SkillFlags.SubActuate;
            }
            if (json.is_fixed != 0)
            {
                this.flags |= SkillFlags.FixedDamage;
            }
            if (json.f_ulock != 0)
            {
                this.flags |= SkillFlags.ForceUnitLock;
            }
            if (json.ad_react != 0)
            {
                this.flags |= SkillFlags.AllDamageReaction;
            }
            if (json.ig_elem != 0)
            {
                this.flags |= SkillFlags.IgnoreElement;
            }
            if (json.is_pre_apply != 0)
            {
                this.flags |= SkillFlags.PrevApply;
            }
            if (json.jhp_over != 0)
            {
                this.flags |= SkillFlags.JudgeHpOver;
            }
            if (json.is_mhm_dmg != 0)
            {
                this.flags |= SkillFlags.MhmDamage;
            }
            if (json.ac_is_self != 0)
            {
                this.flags |= SkillFlags.AcSelf;
            }
            if (json.ac_is_reset != 0)
            {
                this.flags |= SkillFlags.AcReset;
            }
            if (json.is_htndiv != 0)
            {
                this.flags |= SkillFlags.HitTargetNumDiv;
            }
            if (json.is_no_ccc != 0)
            {
                this.flags |= SkillFlags.NoChargeCalcCT;
            }
            if (json.jmpbreak != 0)
            {
                this.flags |= SkillFlags.JumpBreak;
            }
            this.hp_cost          = (OInt)json.hp_cost;
            this.hp_cost_rate     = (OInt)Math.Min(Math.Max(json.hp_cost_rate, 0), 100);
            this.random_hit_rate  = (OInt)json.rhit;
            this.effect_type      = (SkillEffectTypes)json.eff_type;
            this.effect_calc      = (SkillParamCalcTypes)json.eff_calc;
            this.effect_rate      = new SkillRankUpValue();
            this.effect_rate.ini  = (OInt)json.eff_rate_ini;
            this.effect_rate.max  = (OInt)json.eff_rate_max;
            this.effect_value     = new SkillRankUpValue();
            this.effect_value.ini = (OInt)json.eff_val_ini;
            this.effect_value.max = (OInt)json.eff_val_max;
            this.effect_range     = new SkillRankUpValue();
            this.effect_range.ini = (OInt)json.eff_range_ini;
            this.effect_range.max = (OInt)json.eff_range_max;
            this.effect_hprate    = (OInt)json.eff_hprate;
            this.effect_mprate    = (OInt)json.eff_mprate;
            this.effect_dead_rate = (OInt)json.eff_durate;
            this.effect_lvrate    = (OInt)json.eff_lvrate;
            this.attack_type      = (AttackTypes)json.atk_type;
            this.attack_detail    = (AttackDetailTypes)json.atk_det;
            this.element_type     = (EElement)json.elem;
            this.element_value    = (SkillRankUpValue)null;
            if (this.element_type != EElement.None)
            {
                this.element_value     = new SkillRankUpValue();
                this.element_value.ini = (OInt)json.elem_ini;
                this.element_value.max = (OInt)json.elem_max;
            }
            this.cast_type  = (ECastTypes)json.ct_type;
            this.cast_speed = (SkillRankUpValue)null;
            if (this.type == ESkillType.Skill && (json.ct_spd_ini != 0 || json.ct_spd_max != 0))
            {
                this.cast_speed     = new SkillRankUpValue();
                this.cast_speed.ini = (OInt)json.ct_spd_ini;
                this.cast_speed.max = (OInt)json.ct_spd_max;
            }
            this.absorb_damage_rate   = (OInt)json.abs_d_rate;
            this.reaction_damage_type = (DamageTypes)json.react_d_type;
            this.reaction_det_lists   = (List <AttackDetailTypes>)null;
            if (json.react_dets != null)
            {
                this.reaction_det_lists = new List <AttackDetailTypes>();
                foreach (AttackDetailTypes reactDet in json.react_dets)
                {
                    this.reaction_det_lists.Add(reactDet);
                }
            }
            this.control_ct_rate  = (SkillRankUpValue)null;
            this.control_ct_value = (SkillRankUpValue)null;
            if (this.control_ct_calc == SkillParamCalcTypes.Fixed || json.ct_val_ini != 0 || json.ct_val_max != 0)
            {
                this.control_ct_rate      = new SkillRankUpValue();
                this.control_ct_rate.ini  = (OInt)json.ct_rate_ini;
                this.control_ct_rate.max  = (OInt)json.ct_rate_max;
                this.control_ct_value     = new SkillRankUpValue();
                this.control_ct_value.ini = (OInt)json.ct_val_ini;
                this.control_ct_value.max = (OInt)json.ct_val_max;
                this.control_ct_calc      = (SkillParamCalcTypes)json.ct_calc;
            }
            this.target_buff_iname  = json.t_buff;
            this.target_cond_iname  = json.t_cond;
            this.self_buff_iname    = json.s_buff;
            this.self_cond_iname    = json.s_cond;
            this.shield_type        = (ShieldTypes)json.shield_type;
            this.shield_damage_type = (DamageTypes)json.shield_d_type;
            this.shield_turn        = (SkillRankUpValue)null;
            this.shield_value       = (SkillRankUpValue)null;
            if (this.shield_type != ShieldTypes.None && this.shield_damage_type != DamageTypes.None)
            {
                this.shield_turn      = new SkillRankUpValue();
                this.shield_turn.ini  = (OInt)json.shield_turn_ini;
                this.shield_turn.max  = (OInt)json.shield_turn_max;
                this.shield_value     = new SkillRankUpValue();
                this.shield_value.ini = (OInt)json.shield_ini;
                this.shield_value.max = (OInt)json.shield_max;
                if (json.shield_reset != 0)
                {
                    this.flags |= SkillFlags.ShieldReset;
                }
            }
            if (this.reaction_damage_type != DamageTypes.None || this.shield_damage_type != DamageTypes.None)
            {
                this.control_damage_rate      = new SkillRankUpValue();
                this.control_damage_rate.ini  = (OInt)json.ctrl_d_rate_ini;
                this.control_damage_rate.max  = (OInt)json.ctrl_d_rate_max;
                this.control_damage_value     = new SkillRankUpValue();
                this.control_damage_value.ini = (OInt)json.ctrl_d_ini;
                this.control_damage_value.max = (OInt)json.ctrl_d_max;
                this.control_damage_calc      = (SkillParamCalcTypes)json.ctrl_d_calc;
            }
            SkillEffectTypes effectType = this.effect_type;

            switch (effectType)
            {
            case SkillEffectTypes.Teleport:
            case SkillEffectTypes.Changing:
            case SkillEffectTypes.Throw:
                this.scope        = (OInt)0;
                this.select_scope = ESelectType.Cross;
                break;

            case SkillEffectTypes.RateDamage:
                if (this.attack_type == AttackTypes.None)
                {
                    this.attack_type = AttackTypes.PhyAttack;
                    break;
                }
                break;

            default:
                if (effectType == SkillEffectTypes.Attack || effectType == SkillEffectTypes.ReflectDamage || effectType == SkillEffectTypes.RateDamageCurrent)
                {
                    goto case SkillEffectTypes.RateDamage;
                }
                else
                {
                    break;
                }
            }
            if (this.select_range == ESelectType.Laser)
            {
                this.select_scope = ESelectType.Laser;
                this.scope        = (OInt)Math.Max((int)this.scope, 1);
            }
            else
            {
                switch (this.select_range)
                {
                case ESelectType.LaserSpread:
                    this.select_scope = ESelectType.LaserSpread;
                    break;

                case ESelectType.LaserWide:
                    this.select_scope = ESelectType.LaserWide;
                    break;

                case ESelectType.LaserTwin:
                    this.select_scope = ESelectType.LaserTwin;
                    break;

                case ESelectType.LaserTriple:
                    this.select_scope = ESelectType.LaserTriple;
                    break;
                }
                switch (this.select_scope)
                {
                case ESelectType.LaserSpread:
                case ESelectType.LaserWide:
                case ESelectType.LaserTwin:
                case ESelectType.LaserTriple:
                    this.scope = (OInt)1;
                    break;
                }
            }
            if (this.TeleportType != eTeleportType.None)
            {
                if (!this.IsTargetGridNoUnit && this.TeleportType != eTeleportType.BeforeSkill)
                {
                    this.target = ESkillTarget.GridNoUnit;
                }
                if (this.IsTargetTeleport)
                {
                    if (this.IsCastSkill())
                    {
                        this.cast_speed = (SkillRankUpValue)null;
                    }
                    if ((int)this.scope != 0)
                    {
                        this.scope = (OInt)0;
                    }
                }
            }
            if (this.IsTargetValidGrid && !this.IsTrickSkill())
            {
                this.target = ESkillTarget.GridNoUnit;
            }
            if (this.timing == ESkillTiming.Auto && this.effect_type == SkillEffectTypes.Attack)
            {
                this.effect_type = SkillEffectTypes.Buff;
            }
            return(true);
        }
Example #16
0
        public bool Deserialize(JSON_SkillParam json)
        {
            if (json == null)
            {
                return(false);
            }
            this.iname               = json.iname;
            this.name                = json.name;
            this.expr                = json.expr;
            this.motion              = json.motnm;
            this.effect              = json.effnm;
            this.defend_effect       = json.effdef;
            this.weapon              = json.weapon;
            this.tokkou              = json.tktag;
            this.tk_rate             = json.tkrate;
            this.type                = (ESkillType)json.type;
            this.timing              = (ESkillTiming)json.timing;
            this.condition           = (ESkillCondition)json.cond;
            this.target              = (ESkillTarget)json.target;
            this.line_type           = (ELineType)json.line;
            this.lvcap               = (OInt)json.cap;
            this.cost                = (OInt)json.cost;
            this.count               = (OInt)json.count;
            this.rate                = (OInt)json.rate;
            this.select_range        = (ESelectType)json.sran;
            this.range_min           = (OInt)json.rangemin;
            this.range_max           = (OInt)json.range;
            this.select_scope        = (ESelectType)json.ssco;
            this.scope               = (OInt)json.scope;
            this.effect_height       = (OInt)json.eff_h;
            this.back_defrate        = (OInt)json.bdb;
            this.side_defrate        = (OInt)json.sdb;
            this.ignore_defense_rate = (OInt)json.idr;
            this.job              = json.job;
            this.SceneName        = json.scn;
            this.ComboNum         = (OInt)json.combo_num;
            this.ComboDamageRate  = (OInt)(100 - Math.Abs(json.combo_rate));
            this.IsCritical       = (OBool)(json.is_cri != 0);
            this.JewelDamageType  = (JewelDamageTypes)json.jdtype;
            this.JewelDamageValue = (OInt)json.jdv;
            this.IsJewelAbsorb    = (OBool)(json.jdabs != 0);
            this.DuplicateCount   = (OInt)json.dupli;
            this.CollaboMainId    = json.cs_main_id;
            this.CollaboHeight    = (OInt)json.cs_height;
            this.KnockBackRate    = (OInt)json.kb_rate;
            this.KnockBackVal     = (OInt)json.kb_val;
            this.DamageDispType   = (eDamageDispType)json.dmg_dt;
            this.ReplaceTargetIdLists.Clear();
            if (json.rp_tgt_ids != null)
            {
                foreach (string rpTgtId in json.rp_tgt_ids)
                {
                    this.ReplaceTargetIdLists.Add(rpTgtId);
                }
            }
            this.ReplaceChangeIdLists.Clear();
            if (json.rp_chg_ids != null)
            {
                foreach (string rpChgId in json.rp_chg_ids)
                {
                    this.ReplaceChangeIdLists.Add(rpChgId);
                }
            }
            if (this.ReplaceTargetIdLists.Count != this.ReplaceChangeIdLists.Count)
            {
                this.ReplaceTargetIdLists.Clear();
                this.ReplaceChangeIdLists.Clear();
            }
            this.AbilityReplaceTargetIdLists.Clear();
            if (json.ab_rp_tgt_ids != null)
            {
                foreach (string abRpTgtId in json.ab_rp_tgt_ids)
                {
                    this.AbilityReplaceTargetIdLists.Add(abRpTgtId);
                }
            }
            this.AbilityReplaceChangeIdLists.Clear();
            if (json.ab_rp_chg_ids != null)
            {
                foreach (string abRpChgId in json.ab_rp_chg_ids)
                {
                    this.AbilityReplaceChangeIdLists.Add(abRpChgId);
                }
            }
            if (this.AbilityReplaceTargetIdLists.Count != this.AbilityReplaceChangeIdLists.Count)
            {
                this.AbilityReplaceTargetIdLists.Clear();
                this.AbilityReplaceChangeIdLists.Clear();
            }
            this.CollaboVoiceId             = json.cs_voice;
            this.CollaboVoicePlayDelayFrame = json.cs_vp_df;
            this.flags = (SkillFlags)0;
            if (json.cutin != 0)
            {
                this.flags |= SkillFlags.ExecuteCutin;
            }
            if (json.isbtl != 0)
            {
                this.flags |= SkillFlags.ExecuteInBattle;
            }
            if (json.chran != 0)
            {
                this.flags |= SkillFlags.EnableChangeRange;
            }
            if (json.sonoba != 0)
            {
                this.flags |= SkillFlags.SelfTargetSelect;
            }
            if (json.pierce != 0)
            {
                this.flags |= SkillFlags.PierceAttack;
            }
            if (json.hbonus != 0)
            {
                this.flags |= SkillFlags.EnableHeightRangeBonus;
            }
            if (json.ehpa != 0)
            {
                this.flags |= SkillFlags.EnableHeightParamAdjust;
            }
            if (json.utgt != 0)
            {
                this.flags |= SkillFlags.EnableUnitLockTarget;
            }
            if (json.ctbreak != 0)
            {
                this.flags |= SkillFlags.CastBreak;
            }
            if (json.mpatk != 0)
            {
                this.flags |= SkillFlags.JewelAttack;
            }
            if (json.fhit != 0)
            {
                this.flags |= SkillFlags.ForceHit;
            }
            if (json.suicide != 0)
            {
                this.flags |= SkillFlags.Suicide;
            }
            this.hp_cost          = (OInt)json.hp_cost;
            this.hp_cost_rate     = (OInt)Math.Min(Math.Max(json.hp_cost_rate, 0), 100);
            this.random_hit_rate  = (OInt)json.rhit;
            this.effect_type      = (SkillEffectTypes)json.eff_type;
            this.effect_calc      = (SkillParamCalcTypes)json.eff_calc;
            this.effect_rate      = new SkillRankUpValue();
            this.effect_rate.ini  = (OInt)json.eff_rate_ini;
            this.effect_rate.max  = (OInt)json.eff_rate_max;
            this.effect_value     = new SkillRankUpValue();
            this.effect_value.ini = (OInt)json.eff_val_ini;
            this.effect_value.max = (OInt)json.eff_val_max;
            this.effect_range     = new SkillRankUpValue();
            this.effect_range.ini = (OInt)json.eff_range_ini;
            this.effect_range.max = (OInt)json.eff_range_max;
            this.effect_hprate    = (OInt)json.eff_hprate;
            this.effect_mprate    = (OInt)json.eff_mprate;
            this.effect_dead_rate = (OInt)json.eff_durate;
            this.effect_lvrate    = (OInt)json.eff_lvrate;
            this.attack_type      = (AttackTypes)json.atk_type;
            this.attack_detail    = (AttackDetailTypes)json.atk_det;
            this.element_type     = (EElement)json.elem;
            this.element_value    = (SkillRankUpValue)null;
            if (this.element_type != EElement.None)
            {
                this.element_value     = new SkillRankUpValue();
                this.element_value.ini = (OInt)json.elem_ini;
                this.element_value.max = (OInt)json.elem_max;
            }
            this.cast_type  = (ECastTypes)json.ct_type;
            this.cast_speed = (SkillRankUpValue)null;
            if (this.type == ESkillType.Skill && (json.ct_spd_ini != 0 || json.ct_spd_max != 0))
            {
                this.cast_speed     = new SkillRankUpValue();
                this.cast_speed.ini = (OInt)json.ct_spd_ini;
                this.cast_speed.max = (OInt)json.ct_spd_max;
            }
            this.absorb_damage_rate   = (OInt)json.abs_d_rate;
            this.reaction_damage_type = (DamageTypes)json.react_d_type;
            this.reaction_det_lists.Clear();
            if (json.react_dets != null)
            {
                foreach (AttackDetailTypes reactDet in json.react_dets)
                {
                    this.reaction_det_lists.Add(reactDet);
                }
            }
            if (this.reaction_damage_type != DamageTypes.None)
            {
                this.control_damage_value     = new SkillRankUpValue();
                this.control_damage_value.ini = (OInt)json.ctrl_d_ini;
                this.control_damage_value.max = (OInt)json.ctrl_d_max;
                this.control_damage_calc      = (SkillParamCalcTypes)json.ctrl_d_calc;
            }
            this.control_ct_rate  = (SkillRankUpValue)null;
            this.control_ct_value = (SkillRankUpValue)null;
            if (this.control_ct_calc == SkillParamCalcTypes.Fixed || json.ct_val_ini != 0 || json.ct_val_max != 0)
            {
                this.control_ct_rate      = new SkillRankUpValue();
                this.control_ct_rate.ini  = (OInt)json.ct_rate_ini;
                this.control_ct_rate.max  = (OInt)json.ct_rate_max;
                this.control_ct_value     = new SkillRankUpValue();
                this.control_ct_value.ini = (OInt)json.ct_val_ini;
                this.control_ct_value.max = (OInt)json.ct_val_max;
                this.control_ct_calc      = (SkillParamCalcTypes)json.ct_calc;
            }
            this.target_buff_iname  = json.t_buff;
            this.target_cond_iname  = json.t_cond;
            this.self_buff_iname    = json.s_buff;
            this.self_cond_iname    = json.s_cond;
            this.shield_type        = (ShieldTypes)json.shield_type;
            this.shield_damage_type = (DamageTypes)json.shield_d_type;
            this.shield_turn        = (SkillRankUpValue)null;
            this.shield_value       = (SkillRankUpValue)null;
            if (this.shield_type != ShieldTypes.None && this.shield_damage_type != DamageTypes.None)
            {
                this.shield_turn      = new SkillRankUpValue();
                this.shield_turn.ini  = (OInt)json.shield_turn_ini;
                this.shield_turn.max  = (OInt)json.shield_turn_max;
                this.shield_value     = new SkillRankUpValue();
                this.shield_value.ini = (OInt)json.shield_ini;
                this.shield_value.max = (OInt)json.shield_max;
            }
            SkillEffectTypes effectType = this.effect_type;

            switch (effectType)
            {
            case SkillEffectTypes.Teleport:
            case SkillEffectTypes.Changing:
            case SkillEffectTypes.Throw:
                this.scope        = (OInt)0;
                this.select_scope = ESelectType.Cross;
                break;

            case SkillEffectTypes.RateDamage:
                if (this.attack_type == AttackTypes.None)
                {
                    this.attack_type = AttackTypes.PhyAttack;
                    break;
                }
                break;

            default:
                if (effectType == SkillEffectTypes.Attack || effectType == SkillEffectTypes.ReflectDamage)
                {
                    goto case SkillEffectTypes.RateDamage;
                }
                else
                {
                    break;
                }
            }
            if (this.select_range == ESelectType.Laser)
            {
                this.select_scope = ESelectType.Laser;
                this.scope        = (OInt)Math.Max((int)this.scope, 1);
            }
            else
            {
                switch (this.select_range)
                {
                case ESelectType.LaserSpread:
                    this.select_scope = ESelectType.LaserSpread;
                    break;

                case ESelectType.LaserWide:
                    this.select_scope = ESelectType.LaserWide;
                    break;

                case ESelectType.LaserTwin:
                    this.select_scope = ESelectType.LaserTwin;
                    break;

                case ESelectType.LaserTriple:
                    this.select_scope = ESelectType.LaserTriple;
                    break;
                }
                switch (this.select_scope)
                {
                case ESelectType.LaserSpread:
                case ESelectType.LaserWide:
                case ESelectType.LaserTwin:
                case ESelectType.LaserTriple:
                    this.scope = (OInt)1;
                    break;
                }
            }
            return(true);
        }
Example #17
0
        public void CalcBuffStatus(ref BaseStatus status, BuffTypes buffType, SkillParamCalcTypes calcType)
        {
            for (int index = 0; index < this.targets.Count; ++index)
            {
                BuffEffect.BuffTarget target = this.targets[index];
                if (target.buffType == buffType && target.calcType == calcType)
                {
                    ParamTypes paramType = target.paramType;
                    int        num       = (int)target.value;
                    switch (paramType)
                    {
                    case ParamTypes.Hp:
                        this.SetBuffValue(buffType, ref status.param.values_hp, num);
                        continue;

                    case ParamTypes.HpMax:
                        this.SetBuffValue(buffType, ref status.param.values_hp, num);
                        continue;

                    case ParamTypes.Mp:
                        this.SetBuffValue(buffType, ref status.param.values[0], num);
                        continue;

                    case ParamTypes.MpIni:
                        this.SetBuffValue(buffType, ref status.param.values[1], num);
                        continue;

                    case ParamTypes.Atk:
                        this.SetBuffValue(buffType, ref status.param.values[2], num);
                        continue;

                    case ParamTypes.Def:
                        this.SetBuffValue(buffType, ref status.param.values[3], num);
                        continue;

                    case ParamTypes.Mag:
                        this.SetBuffValue(buffType, ref status.param.values[4], num);
                        continue;

                    case ParamTypes.Mnd:
                        this.SetBuffValue(buffType, ref status.param.values[5], num);
                        continue;

                    case ParamTypes.Rec:
                        this.SetBuffValue(buffType, ref status.param.values[6], num);
                        continue;

                    case ParamTypes.Dex:
                        this.SetBuffValue(buffType, ref status.param.values[7], num);
                        continue;

                    case ParamTypes.Spd:
                        this.SetBuffValue(buffType, ref status.param.values[8], num);
                        continue;

                    case ParamTypes.Cri:
                        this.SetBuffValue(buffType, ref status.param.values[9], num);
                        continue;

                    case ParamTypes.Luk:
                        this.SetBuffValue(buffType, ref status.param.values[10], num);
                        continue;

                    case ParamTypes.Mov:
                        this.SetBuffValue(buffType, ref status.param.values[11], num);
                        continue;

                    case ParamTypes.Jmp:
                        this.SetBuffValue(buffType, ref status.param.values[12], num);
                        continue;

                    case ParamTypes.EffectRange:
                        this.SetBuffValue(buffType, ref status.bonus.values[0], num);
                        continue;

                    case ParamTypes.EffectScope:
                        this.SetBuffValue(buffType, ref status.bonus.values[1], num);
                        continue;

                    case ParamTypes.EffectHeight:
                        this.SetBuffValue(buffType, ref status.bonus.values[2], num);
                        continue;

                    case ParamTypes.Assist_Fire:
                        this.SetBuffValue(buffType, ref status.element_assist.values[1], num);
                        continue;

                    case ParamTypes.Assist_Water:
                        this.SetBuffValue(buffType, ref status.element_assist.values[2], num);
                        continue;

                    case ParamTypes.Assist_Wind:
                        this.SetBuffValue(buffType, ref status.element_assist.values[3], num);
                        continue;

                    case ParamTypes.Assist_Thunder:
                        this.SetBuffValue(buffType, ref status.element_assist.values[4], num);
                        continue;

                    case ParamTypes.Assist_Shine:
                        this.SetBuffValue(buffType, ref status.element_assist.values[5], num);
                        continue;

                    case ParamTypes.Assist_Dark:
                        this.SetBuffValue(buffType, ref status.element_assist.values[6], num);
                        continue;

                    case ParamTypes.Assist_Poison:
                        this.SetBuffValue(buffType, ref status.enchant_assist.values[0], num);
                        continue;

                    case ParamTypes.Assist_Paralysed:
                        this.SetBuffValue(buffType, ref status.enchant_assist.values[1], num);
                        continue;

                    case ParamTypes.Assist_Stun:
                        this.SetBuffValue(buffType, ref status.enchant_assist.values[2], num);
                        continue;

                    case ParamTypes.Assist_Sleep:
                        this.SetBuffValue(buffType, ref status.enchant_assist.values[3], num);
                        continue;

                    case ParamTypes.Assist_Charm:
                        this.SetBuffValue(buffType, ref status.enchant_assist.values[4], num);
                        continue;

                    case ParamTypes.Assist_Stone:
                        this.SetBuffValue(buffType, ref status.enchant_assist.values[5], num);
                        continue;

                    case ParamTypes.Assist_Blind:
                        this.SetBuffValue(buffType, ref status.enchant_assist.values[6], num);
                        continue;

                    case ParamTypes.Assist_DisableSkill:
                        this.SetBuffValue(buffType, ref status.enchant_assist.values[7], num);
                        continue;

                    case ParamTypes.Assist_DisableMove:
                        this.SetBuffValue(buffType, ref status.enchant_assist.values[8], num);
                        continue;

                    case ParamTypes.Assist_DisableAttack:
                        this.SetBuffValue(buffType, ref status.enchant_assist.values[9], num);
                        continue;

                    case ParamTypes.Assist_Zombie:
                        this.SetBuffValue(buffType, ref status.enchant_assist.values[10], num);
                        continue;

                    case ParamTypes.Assist_DeathSentence:
                        this.SetBuffValue(buffType, ref status.enchant_assist.values[11], num);
                        continue;

                    case ParamTypes.Assist_Berserk:
                        this.SetBuffValue(buffType, ref status.enchant_assist.values[12], num);
                        continue;

                    case ParamTypes.Assist_Knockback:
                        this.SetBuffValue(buffType, ref status.enchant_assist.values[13], num);
                        continue;

                    case ParamTypes.Assist_ResistBuff:
                        this.SetBuffValue(buffType, ref status.enchant_assist.values[14], num);
                        continue;

                    case ParamTypes.Assist_ResistDebuff:
                        this.SetBuffValue(buffType, ref status.enchant_assist.values[15], num);
                        continue;

                    case ParamTypes.Assist_Stop:
                        this.SetBuffValue(buffType, ref status.enchant_assist.values[16], num);
                        continue;

                    case ParamTypes.Assist_Fast:
                        this.SetBuffValue(buffType, ref status.enchant_assist.values[17], num);
                        continue;

                    case ParamTypes.Assist_Slow:
                        this.SetBuffValue(buffType, ref status.enchant_assist.values[18], num);
                        continue;

                    case ParamTypes.Assist_AutoHeal:
                        this.SetBuffValue(buffType, ref status.enchant_assist.values[19], num);
                        continue;

                    case ParamTypes.Assist_Donsoku:
                        this.SetBuffValue(buffType, ref status.enchant_assist.values[20], num);
                        continue;

                    case ParamTypes.Assist_Rage:
                        this.SetBuffValue(buffType, ref status.enchant_assist.values[21], num);
                        continue;

                    case ParamTypes.Assist_GoodSleep:
                        this.SetBuffValue(buffType, ref status.enchant_assist.values[22], num);
                        continue;

                    case ParamTypes.Assist_ConditionAll:
                        this.SetBuffValue(buffType, ref status.enchant_assist.values[0], num);
                        this.SetBuffValue(buffType, ref status.enchant_assist.values[1], num);
                        this.SetBuffValue(buffType, ref status.enchant_assist.values[2], num);
                        this.SetBuffValue(buffType, ref status.enchant_assist.values[3], num);
                        this.SetBuffValue(buffType, ref status.enchant_assist.values[4], num);
                        this.SetBuffValue(buffType, ref status.enchant_assist.values[5], num);
                        this.SetBuffValue(buffType, ref status.enchant_assist.values[6], num);
                        this.SetBuffValue(buffType, ref status.enchant_assist.values[7], num);
                        this.SetBuffValue(buffType, ref status.enchant_assist.values[8], num);
                        this.SetBuffValue(buffType, ref status.enchant_assist.values[9], num);
                        this.SetBuffValue(buffType, ref status.enchant_assist.values[11], num);
                        this.SetBuffValue(buffType, ref status.enchant_assist.values[12], num);
                        this.SetBuffValue(buffType, ref status.enchant_assist.values[16], num);
                        this.SetBuffValue(buffType, ref status.enchant_assist.values[17], num);
                        this.SetBuffValue(buffType, ref status.enchant_assist.values[18], num);
                        this.SetBuffValue(buffType, ref status.enchant_assist.values[20], num);
                        this.SetBuffValue(buffType, ref status.enchant_assist.values[21], num);
                        this.SetBuffValue(buffType, ref status.enchant_assist.values[24], num);
                        continue;

                    case ParamTypes.Resist_Fire:
                        this.SetBuffValue(buffType, ref status.element_resist.values[1], num);
                        continue;

                    case ParamTypes.Resist_Water:
                        this.SetBuffValue(buffType, ref status.element_resist.values[2], num);
                        continue;

                    case ParamTypes.Resist_Wind:
                        this.SetBuffValue(buffType, ref status.element_resist.values[3], num);
                        continue;

                    case ParamTypes.Resist_Thunder:
                        this.SetBuffValue(buffType, ref status.element_resist.values[4], num);
                        continue;

                    case ParamTypes.Resist_Shine:
                        this.SetBuffValue(buffType, ref status.element_resist.values[5], num);
                        continue;

                    case ParamTypes.Resist_Dark:
                        this.SetBuffValue(buffType, ref status.element_resist.values[6], num);
                        continue;

                    case ParamTypes.Resist_Poison:
                        this.SetBuffValue(buffType, ref status.enchant_resist.values[0], num);
                        continue;

                    case ParamTypes.Resist_Paralysed:
                        this.SetBuffValue(buffType, ref status.enchant_resist.values[1], num);
                        continue;

                    case ParamTypes.Resist_Stun:
                        this.SetBuffValue(buffType, ref status.enchant_resist.values[2], num);
                        continue;

                    case ParamTypes.Resist_Sleep:
                        this.SetBuffValue(buffType, ref status.enchant_resist.values[3], num);
                        continue;

                    case ParamTypes.Resist_Charm:
                        this.SetBuffValue(buffType, ref status.enchant_resist.values[4], num);
                        continue;

                    case ParamTypes.Resist_Stone:
                        this.SetBuffValue(buffType, ref status.enchant_resist.values[5], num);
                        continue;

                    case ParamTypes.Resist_Blind:
                        this.SetBuffValue(buffType, ref status.enchant_resist.values[6], num);
                        continue;

                    case ParamTypes.Resist_DisableSkill:
                        this.SetBuffValue(buffType, ref status.enchant_resist.values[7], num);
                        continue;

                    case ParamTypes.Resist_DisableMove:
                        this.SetBuffValue(buffType, ref status.enchant_resist.values[8], num);
                        continue;

                    case ParamTypes.Resist_DisableAttack:
                        this.SetBuffValue(buffType, ref status.enchant_resist.values[9], num);
                        continue;

                    case ParamTypes.Resist_Zombie:
                        this.SetBuffValue(buffType, ref status.enchant_resist.values[10], num);
                        continue;

                    case ParamTypes.Resist_DeathSentence:
                        this.SetBuffValue(buffType, ref status.enchant_resist.values[11], num);
                        continue;

                    case ParamTypes.Resist_Berserk:
                        this.SetBuffValue(buffType, ref status.enchant_resist.values[12], num);
                        continue;

                    case ParamTypes.Resist_Knockback:
                        this.SetBuffValue(buffType, ref status.enchant_resist.values[13], num);
                        continue;

                    case ParamTypes.Resist_ResistBuff:
                        this.SetBuffValue(buffType, ref status.enchant_resist.values[14], num);
                        continue;

                    case ParamTypes.Resist_ResistDebuff:
                        this.SetBuffValue(buffType, ref status.enchant_resist.values[15], num);
                        continue;

                    case ParamTypes.Resist_Stop:
                        this.SetBuffValue(buffType, ref status.enchant_resist.values[16], num);
                        continue;

                    case ParamTypes.Resist_Fast:
                        this.SetBuffValue(buffType, ref status.enchant_resist.values[17], num);
                        continue;

                    case ParamTypes.Resist_Slow:
                        this.SetBuffValue(buffType, ref status.enchant_resist.values[18], num);
                        continue;

                    case ParamTypes.Resist_AutoHeal:
                        this.SetBuffValue(buffType, ref status.enchant_resist.values[19], num);
                        continue;

                    case ParamTypes.Resist_Donsoku:
                        this.SetBuffValue(buffType, ref status.enchant_resist.values[20], num);
                        continue;

                    case ParamTypes.Resist_Rage:
                        this.SetBuffValue(buffType, ref status.enchant_resist.values[21], num);
                        continue;

                    case ParamTypes.Resist_GoodSleep:
                        this.SetBuffValue(buffType, ref status.enchant_resist.values[22], num);
                        continue;

                    case ParamTypes.Resist_ConditionAll:
                        this.SetBuffValue(buffType, ref status.enchant_resist.values[0], num);
                        this.SetBuffValue(buffType, ref status.enchant_resist.values[1], num);
                        this.SetBuffValue(buffType, ref status.enchant_resist.values[2], num);
                        this.SetBuffValue(buffType, ref status.enchant_resist.values[3], num);
                        this.SetBuffValue(buffType, ref status.enchant_resist.values[4], num);
                        this.SetBuffValue(buffType, ref status.enchant_resist.values[5], num);
                        this.SetBuffValue(buffType, ref status.enchant_resist.values[6], num);
                        this.SetBuffValue(buffType, ref status.enchant_resist.values[7], num);
                        this.SetBuffValue(buffType, ref status.enchant_resist.values[8], num);
                        this.SetBuffValue(buffType, ref status.enchant_resist.values[9], num);
                        this.SetBuffValue(buffType, ref status.enchant_resist.values[11], num);
                        this.SetBuffValue(buffType, ref status.enchant_resist.values[12], num);
                        this.SetBuffValue(buffType, ref status.enchant_resist.values[16], num);
                        this.SetBuffValue(buffType, ref status.enchant_resist.values[18], num);
                        this.SetBuffValue(buffType, ref status.enchant_resist.values[20], num);
                        this.SetBuffValue(buffType, ref status.enchant_resist.values[21], num);
                        this.SetBuffValue(buffType, ref status.enchant_resist.values[24], num);
                        continue;

                    case ParamTypes.HitRate:
                        this.SetBuffValue(buffType, ref status.bonus.values[3], num);
                        continue;

                    case ParamTypes.AvoidRate:
                        this.SetBuffValue(buffType, ref status.bonus.values[4], num);
                        continue;

                    case ParamTypes.CriticalRate:
                        this.SetBuffValue(buffType, ref status.bonus.values[5], num);
                        continue;

                    case ParamTypes.GainJewel:
                        this.SetBuffValue(buffType, ref status.bonus.values[13], num);
                        continue;

                    case ParamTypes.UsedJewelRate:
                        this.SetBuffValue(buffType, ref status.bonus.values[14], num);
                        continue;

                    case ParamTypes.ActionCount:
                        this.SetBuffValue(buffType, ref status.bonus.values[15], num);
                        continue;

                    case ParamTypes.SlashAttack:
                        this.SetBuffValue(buffType, ref status.bonus.values[6], num);
                        continue;

                    case ParamTypes.PierceAttack:
                        this.SetBuffValue(buffType, ref status.bonus.values[7], num);
                        continue;

                    case ParamTypes.BlowAttack:
                        this.SetBuffValue(buffType, ref status.bonus.values[8], num);
                        continue;

                    case ParamTypes.ShotAttack:
                        this.SetBuffValue(buffType, ref status.bonus.values[9], num);
                        continue;

                    case ParamTypes.MagicAttack:
                        this.SetBuffValue(buffType, ref status.bonus.values[10], num);
                        continue;

                    case ParamTypes.ReactionAttack:
                        this.SetBuffValue(buffType, ref status.bonus.values[11], num);
                        continue;

                    case ParamTypes.JumpAttack:
                        this.SetBuffValue(buffType, ref status.bonus.values[12], num);
                        continue;

                    case ParamTypes.GutsRate:
                        this.SetBuffValue(buffType, ref status.bonus.values[16], num);
                        continue;

                    case ParamTypes.AutoJewel:
                        this.SetBuffValue(buffType, ref status.bonus.values[17], num);
                        continue;

                    case ParamTypes.ChargeTimeRate:
                        this.SetBuffValue(buffType, ref status.bonus.values[18], num);
                        continue;

                    case ParamTypes.CastTimeRate:
                        this.SetBuffValue(buffType, ref status.bonus.values[19], num);
                        continue;

                    case ParamTypes.BuffTurn:
                        this.SetBuffValue(buffType, ref status.bonus.values[20], num);
                        continue;

                    case ParamTypes.DebuffTurn:
                        this.SetBuffValue(buffType, ref status.bonus.values[21], num);
                        continue;

                    case ParamTypes.CombinationRange:
                        this.SetBuffValue(buffType, ref status.bonus.values[22], num);
                        continue;

                    case ParamTypes.HpCostRate:
                        this.SetBuffValue(buffType, ref status.bonus.values[23], num);
                        continue;

                    case ParamTypes.SkillUseCount:
                        this.SetBuffValue(buffType, ref status.bonus.values[24], num);
                        continue;

                    case ParamTypes.PoisonDamage:
                        this.SetBuffValue(buffType, ref status.bonus.values[25], num);
                        continue;

                    case ParamTypes.PoisonTurn:
                        this.SetBuffValue(buffType, ref status.bonus.values[26], num);
                        continue;

                    case ParamTypes.Assist_AutoJewel:
                        this.SetBuffValue(buffType, ref status.enchant_assist.values[23], num);
                        continue;

                    case ParamTypes.Resist_AutoJewel:
                        this.SetBuffValue(buffType, ref status.enchant_resist.values[23], num);
                        continue;

                    case ParamTypes.Assist_DisableHeal:
                        this.SetBuffValue(buffType, ref status.enchant_assist.values[24], num);
                        continue;

                    case ParamTypes.Resist_DisableHeal:
                        this.SetBuffValue(buffType, ref status.enchant_resist.values[24], num);
                        continue;

                    case ParamTypes.Resist_Slash:
                        this.SetBuffValue(buffType, ref status.bonus.values[27], num);
                        continue;

                    case ParamTypes.Resist_Pierce:
                        this.SetBuffValue(buffType, ref status.bonus.values[28], num);
                        continue;

                    case ParamTypes.Resist_Blow:
                        this.SetBuffValue(buffType, ref status.bonus.values[29], num);
                        continue;

                    case ParamTypes.Resist_Shot:
                        this.SetBuffValue(buffType, ref status.bonus.values[30], num);
                        continue;

                    case ParamTypes.Resist_Magic:
                        this.SetBuffValue(buffType, ref status.bonus.values[31], num);
                        continue;

                    case ParamTypes.Resist_Reaction:
                        this.SetBuffValue(buffType, ref status.bonus.values[32], num);
                        continue;

                    case ParamTypes.Resist_Jump:
                        this.SetBuffValue(buffType, ref status.bonus.values[33], num);
                        continue;

                    case ParamTypes.Avoid_Slash:
                        this.SetBuffValue(buffType, ref status.bonus.values[34], num);
                        continue;

                    case ParamTypes.Avoid_Pierce:
                        this.SetBuffValue(buffType, ref status.bonus.values[35], num);
                        continue;

                    case ParamTypes.Avoid_Blow:
                        this.SetBuffValue(buffType, ref status.bonus.values[36], num);
                        continue;

                    case ParamTypes.Avoid_Shot:
                        this.SetBuffValue(buffType, ref status.bonus.values[37], num);
                        continue;

                    case ParamTypes.Avoid_Magic:
                        this.SetBuffValue(buffType, ref status.bonus.values[38], num);
                        continue;

                    case ParamTypes.Avoid_Reaction:
                        this.SetBuffValue(buffType, ref status.bonus.values[39], num);
                        continue;

                    case ParamTypes.Avoid_Jump:
                        this.SetBuffValue(buffType, ref status.bonus.values[40], num);
                        continue;

                    default:
                        continue;
                    }
                }
            }
        }