コード例 #1
0
    public void initalize(string ID, ESkillType skillType, object ability, object[] data = null)
    {
        this.ID      = ID;
        this.name    = ID;
        this.Type    = skillType;
        this.Ability = ability;

        SkillData skillData = ReadDatabase.Instance.SkillInfo[ID.ToUpper()];

        foreach (string key in skillData.States.Keys)
        {
            ESkillAction state = (ESkillAction)Extensions.GetEnum(ESkillAction.DROP.GetType(), key.ToUpper());
            listState.Add(state, getClassSkill(state));
        }

        //first element
        var enumerator = listState.Keys.GetEnumerator();

        enumerator.MoveNext();

        //set Property for state
        setPropertyState(skillType, data);
        //set Property from database
        setPropertyFromDatabase();

        FSM.Configure(this, listState[enumerator.Current]);
        stateAction = enumerator.Current;

        runResources();
    }
コード例 #2
0
ファイル: Skill.cs プロジェクト: SKaralius/arena-combat-rpg
 public Skill(UseSkillHandler effect, string name, float skillRange, ESkillType skillType)
 {
     Effect     = effect;
     Name       = name;
     SkillRange = skillRange;
     SkillType  = skillType;
 }
コード例 #3
0
ファイル: SkillSystemManager.cs プロジェクト: soulhez/Lemon
 public void Run(ESkillType skillSystemTriggerType, params object[] objs)
 {
     Dictionary <int, SkillUnit> .Enumerator enumerator = dictSkillUnits.GetEnumerator();
     while (enumerator.MoveNext())
     {
         enumerator.Current.Value.Run(skillSystemTriggerType, objs);
     }
 }
コード例 #4
0
        private int GetSkillId(ESkillType type)
        {
            int baseId = 0;

            // if(Skillid)
            // return baseId;
            // todo
            return(1200301);
        }
コード例 #5
0
        private void SendSkill(int btn)
        {
            ESkillType type = GetSkillType(btn);

            if (type == ESkillType.NULL)
            {
                return;
            }
            PlayerManager.Instance.LocalPlayer.SendPreparePlaySkill(type);
        }
コード例 #6
0
        public void Init(SkillItemLink skillItemLink, ESkillType skillType)
        {
            mSkillType     = skillType;
            mSkillItemLink = skillItemLink;
            mLinkIndex     = 0;
            InitSkillByIdx(mLinkIndex);
            mIsSkillBtnDown = false;

            Game.EventMgr.Subscribe(PlayerCtrlEvent.UpdateSkillCD.EventID, OnEventUpdateSkillCD);
        }
コード例 #7
0
 public override void Read(XmlElement element)
 {
     this.Id            = element.GetInt32("Id");
     this.Name          = element.GetString("Name");
     this.Icon          = element.GetString("Icon");
     this.Desc          = element.GetString("Desc");
     this.SkillType     = (ESkillType)element.GetInt32("SkillType");
     this.Priority      = element.GetInt32("Priority");
     this.CountDown     = element.GetFloat("CountDown");
     this.SkillCostType = (ESkillCostType)element.GetInt32("SkillCostType");
     this.SkillCostNum  = element.GetInt32("SkillCostNum");
 }
コード例 #8
0
        ESkillType GetSkillType(int btn)
        {
            ESkillType type = ESkillType.NULL;

            switch (btn)
            {
            case 0:
                type = ESkillType.TYPE1;
                break;
            }
            return(type);
        }
コード例 #9
0
    public void AddSkill(int count = 1, ESkillType skillType = ESkillType.NONE)
    {
        if (mSkillType == ESkillType.NONE && skillType == ESkillType.NONE)
        {
            return;
        }

        if (skillType != ESkillType.NONE && skillType != mSkillType)
        {
            mSkillType = skillType;
        }
        mSkillCount += count;
    }
コード例 #10
0
        public void SendPreparePlaySkill(ESkillType type)
        {
            int skillId = GetSkillId(type);

            if (false)    // 沉默了
            {
                return;
            }
            if (skillId == 0)    // 出现错误了
            {
                return;
            }
            MessageCenter.Instance.AskUseSkill((uint)skillId);
        }
コード例 #11
0
ファイル: DropedSkill.cs プロジェクト: Yiiip/Dodge-It
    public void Init(ESkillType skillType)
    {
        this.dropedSkillType = skillType;

        switch (dropedSkillType)
        {
        case ESkillType.SKILL_01:
            spriteIcon.sprite = SpriteManager.Instance.GetSprite("Sprites/sSkillIcon01");
            break;

        case ESkillType.SKILL_02:
        case ESkillType.NONE:
        default:
            Debug.LogWarning("init DropedSkill failed! The type is NONE.");
            Destroy(this.gameObject);
            break;
        }
    }
コード例 #12
0
    void setPropertyState(ESkillType skillType, object[] data) // for destination position
    {
        if (data == null)
        {
            return;
        }

        if (data.Length <= 0)
        {
            return;
        }

        if (skillType == ESkillType.TARGET)
        {
            foreach (System.Collections.Generic.KeyValuePair <ESkillAction, SkillState> iterator in listState)
            {
                switch (iterator.Key)
                {
                case ESkillAction.ONCE:
                    SkillStateOnce stateOnce = iterator.Value as SkillStateOnce;
                    if ((ESkillOffense)Ability == ESkillOffense.SINGLE)
                    {
                        stateOnce.enemy = (GameObject)data[0];
                    }
                    else
                    {
                        stateOnce.destPosition = (Vector3)data[0];
                    }
                    break;

                case ESkillAction.DROP:
                    SkillStateDrop stateDrop = iterator.Value as SkillStateDrop;
                    stateDrop.destPosition = (Vector3)data[0];
                    break;

                case ESkillAction.TRAP:
                    SkillStateTrap stateTrap = iterator.Value as SkillStateTrap;
                    stateTrap.position = (Vector3)data[0];
                    break;
                }
            }
        }
    }
コード例 #13
0
        private Panel GetPanel(ESkillType Type)
        {
            switch (Type)
            {
            default:
                throw new ArgumentException("Unknown type", "Type");

            case ESkillType.Passive:
                return(panelPassive);

            case ESkillType.Basic:
                return(panelBasic);

            case ESkillType.Combat:
                return(panelCombat);

            case ESkillType.Special:
                return(panelSpecial);
            }
        }
コード例 #14
0
    public void initSkill(string id, int mana, ESkillType type, object ability, object[] data)
    {
        if (dragonController.attribute.MP.Current < mana)
        {
            DeviceService.Instance.openToast("Not enough mana!");
            return;
        }
        else
        {
            dragonController.attribute.MP.Current -= mana;

            if (dragonController.attribute.MP.Current < 0)
            {
                dragonController.attribute.MP.Current = 0;
            }

            float valueTo = dragonController.attribute.MP.Current / (float)dragonController.attribute.MP.Max;
            dragonController.updateTextMP();
            EffectSupportor.Instance.runSliderValue(PlayDragonInfoController.Instance.sliderMP, valueTo, EffectSupportor.TimeValueRunMP);
        }

        GameObject skill = Instantiate(Resources.Load <GameObject>("Prefab/Skill/Skill")) as GameObject;

        if (type == ESkillType.GLOBAL)
        {
            skill.transform.parent = Camera.main.transform;
            skill.transform.GetChild(0).gameObject.layer = 5;
            skill.transform.position = Vector3.zero;
        }
        else //target
        {
            skill.transform.parent = PlayManager.Instance.Temp.Skill.transform;
        }

        skill.transform.localScale = Vector3.one;

        SkillController skillController = skill.GetComponent <SkillController>();

        skillController.Owner = PlayerDragon;
        skillController.initalize(id, type, ability, data);
    }
コード例 #15
0
ファイル: GoodsDeploy.cs プロジェクト: source2728/wuxia
        public int GetAddAttr(ESkillType type)
        {
            switch (type)
            {
            case ESkillType.WaiGong:
                return(AddAtt.AddWaiGong);

            case ESkillType.NeiGong:
                return(AddAtt.AddNeiGong);

            case ESkillType.ShenFa:
                return(AddAtt.AddShenFa);

            case ESkillType.JianFa:
                return(AddAtt.AddJianFa);

            case ESkillType.DaoFa:
                return(AddAtt.AddDaoFa);
            }

            return(0);
        }
コード例 #16
0
    public override void EnterState(EActionState eLastState)
    {
        base.EnterState(eLastState);
        GetSkillData();
        m_eSkillType = ConfigManager.Instance.GetLoader <SkillLoader>().GetSKillType(m_nSkillId);

        m_fAttackMoveSpeed    = m_skillData.MoveSpeed;
        m_fAttackMoveFriction = m_skillData.MoveFriction;

        m_owner.CanMove   = false;
        m_owner.CanJump   = false;
        m_owner.CanAttack = false;
        m_owner.CanSkill  = false;

        m_inputAbility.MoveX(0);

        //播放动画
        m_tk2DSpriteAnimator.Play(m_skillData.ActionName);
        //暂时设定在Update中只造成一次伤害
        m_bCanHit          = true;
        m_bCanCreateEffect = true;
        m_lstSkillEffectId = ConfigManager.Instance.GetLoader <SkillLoader>().GetSkillEffectIdList(m_nSkillId);
    }
コード例 #17
0
ファイル: SkillUnit.cs プロジェクト: soulhez/Lemon
        public bool Run(ESkillType eSkillType, params object[] objs)
        {
            if (bRun)
            {
                //如果当前是Result 是Running状态,判断是否可以打断
                return(false);
            }
            switch (eSkillType)
            {
            case ESkillType.CHARGE:
                Charge();    //通用的节点后面可以循环利用
                break;

            case ESkillType.MOVE:
                Move();
                break;

            default:
                break;
            }
            bRun = true;
            return(true);
        }
コード例 #18
0
    public static object[] getColorSkillType(ESkillType type)
    {
        string s      = "";
        Color  result = Color.white;

        switch (type)
        {
        case ESkillType.TARGET:
            s      = "Target";
            result = ColorSkillTypeDragonTarget;
            break;

        case ESkillType.BUFF:
            s      = "Buff";
            result = ColorSkillTypeDragonBuff;
            break;

        case ESkillType.GLOBAL:
            s      = "Global";
            result = ColorSkillTypeDragonGlobal;
            break;
        }
        return(new object[] { s, result });
    }
コード例 #19
0
ファイル: SkillWindow.cs プロジェクト: satela/xjhU3d
	// Update is called once per frame
	void Update () {

        if (Input.GetKeyDown(KeyCode.Return))
        {
            if (SkillConfiguration.skillsDic.TryGetValue(int.Parse(skillIDText.value),out skilldata))
            {
                skillNameText.value = skilldata.skillName;
                skilltype = skilldata.skilltype;
              //  beatonBackOrFly = skilldata.eBeatonbackFly;
                animatorClip = skilldata.animatorClip;
                skillAttackEffectTimeTxt.value = skilldata.fireTime.ToString();
                moveEffStartTimeInput.value = skilldata.moveBeginTime.ToString();
                harmDisTxt.value = skilldata.harmDist.ToString();
              //  beatonTimeInput.value = skilldata.beatonTime.ToString();
                skillMinDistTxt.value = skilldata.minAttackDist.ToString();

                animatorClip = skilldata.animatorClip;
                fireEffPos = skilldata.fireEffPos;

                isUseMoveEffTgle.value = skilldata.isUseMoveEff;
                isSingleMoveEffTgle.value = skilldata.isSingleMove;

                isNeedAppointTgle.value = skilldata.isNeedAppoint;
                isAttackAllTgle.value = skilldata.isQunGong;

                isShakeCameraTgle.value = skilldata.isShakeCamera;
                shakeTimeInput.value = skilldata.shakeTime.ToString();

                beatonPanelMg.initView(skilldata.beatonDatas);
              //  animatorBeatonClip = skilldata.animatorBeatonClip;

                if (!string.IsNullOrEmpty(skilldata.fireEffUrl))
                {
                    string asseturl = UrlManager.GetEffectUrl(skilldata.fireEffUrl, EEffectType.Attack);
                    attackEffPrefab = AssetDatabase.LoadAssetAtPath(asseturl, typeof(GameObject)) as GameObject;

                }
                else
                    attackEffPrefab = null;
                if (!string.IsNullOrEmpty(skilldata.moveEffUrl))
                {
                    string asseturl = UrlManager.GetEffectUrl(skilldata.moveEffUrl, EEffectType.Move);
                    moveEffPrefab = AssetDatabase.LoadAssetAtPath(asseturl, typeof(GameObject)) as GameObject;
                }
                else
                    moveEffPrefab = null;
                if (!string.IsNullOrEmpty(skilldata.explodeEffUrl))
                {
                    string asseturl = UrlManager.GetEffectUrl(skilldata.explodeEffUrl, EEffectType.Explode);
                    explodeEffPrefab = AssetDatabase.LoadAssetAtPath(asseturl, typeof(GameObject)) as GameObject;
                }
                else
                    explodeEffPrefab = null;
                //if (!string.IsNullOrEmpty(skilldata.beatonEffUrl))
                //{
                //    string asseturl = UrlManager.GetEffectUrl(skilldata.beatonEffUrl, EEffectType.Beaton);
                //    beatonEffPrefab = Resources.LoadAssetAtPath(asseturl, typeof(GameObject)) as GameObject;
                //}
                //else
                //    beatonEffPrefab = null;
            }
            else
            {
                setSkilldata();
            }
        }
        skillTypeTxt.text = "技能类型:" + DefaultSkillParam.skill_type[(int)skilltype];
        //skillDistTypeTxt.text = "攻击距离:" + near_fartype[(int)near_farAtk];

        skillAttackActionTxt.text = "施放动作:" + DefaultSkillParam.ActionName[animatorClip];
        if (attackEffPrefab != null)
            skillAttackEffectTxt.text = "施放特效:" + attackEffPrefab.name;
        else
            skillAttackEffectTxt.text = "施放特效:无";

        skillAttackEffectPosTxt.text = "施放位置:" + DefaultSkillParam.relatePos[(int)fireEffPos];

        if (moveEffPrefab != null)
            moveEffUrlTxt.text = "移动特效:" + moveEffPrefab.name;
        else
            moveEffUrlTxt.text = "移动特效:无";

        if (explodeEffPrefab != null)
            explodeEffUrlTxt.text = "爆炸特效:" + explodeEffPrefab.name;
        else
            explodeEffUrlTxt.text = "移动特效:无";
        
	}
コード例 #20
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);
        }
コード例 #21
0
ファイル: frmMain.cs プロジェクト: GodLesZ/svn-dump
		private Panel GetPanel( ESkillType Type ) {
			switch( Type ) {
				default:
					throw new ArgumentException( "Unknown type", "Type" );
				case ESkillType.Passive:
					return panelPassive;
				case ESkillType.Basic:
					return panelBasic;
				case ESkillType.Combat:
					return panelCombat;
				case ESkillType.Special:
					return panelSpecial;
			}
		}
コード例 #22
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);
        }
コード例 #23
0
    void readSkill()
    {
        SkillInfo = new Dictionary <string, SkillData>();
        TextAsset textAsset = (TextAsset)Resources.Load(GameConfig.DatabasePathSkill);

        string[] temp = textAsset.text.Split('\n');

        int lenght = temp.Length;

        for (int i = 1; i <= lenght - 1; i++)
        {
            if (temp[i].Equals(""))
            {
                break;
            }

            SkillData data = new SkillData();
            string[]  s    = temp[i].Split(';');
            data.Name     = s[2];
            data.Mana     = int.Parse(s[3]);
            data.Cooldown = float.Parse(s[4]);

            #region SKILL TYPE
            s[5] = s[5].Trim();
            string[]   tempType  = s[5].Split('-');
            ESkillType skillType = (ESkillType)Extensions.GetEnum(ESkillType.TARGET.GetType(), tempType[0].ToUpper());
            data.Type = skillType;

            if (skillType == ESkillType.TARGET || skillType == ESkillType.GLOBAL) //ATK skill
            {
                data.Ability = Extensions.GetEnum(ESkillOffense.AOE.GetType(), tempType[1].ToUpper());
            }
            else if (skillType == ESkillType.BUFF)
            {
                data.Ability = Extensions.GetEnum(ESkillBuff.PLAYER.GetType(), tempType[1].ToUpper());
            }
            #endregion

            #region STATE
            string[] tempState = s[6].Split('-');
            string[] tempEvent = null;

            s[8] = s[8].Trim();
            for (int k1 = 0; k1 < tempState.Length; k1++)
            {
                AnimationEventState animationState = new AnimationEventState();

                if (!s[8].Equals("none"))
                {
                    tempEvent = s[8].Split(',');
                    for (int k2 = 0; k2 < tempEvent.Length; k2++)
                    {
                        if (tempEvent[k2] != "")
                        {
                            string[] ss = tempEvent[k2].Split('-');
                            if (tempState[k1].Equals(ss[0]))
                            {
                                for (int k3 = 1; k3 < ss.Length; k3++)
                                {
                                    animationState.listKeyEventFrame.Add(ss[k3]);
                                }

                                break;
                            }
                        }
                    }
                }
                data.States.Add(tempState[k1].ToUpper(), animationState);
            }
            #endregion

            #region TIME FRAME
            s[7] = s[7].Trim();
            if (!s[7].Equals("none"))
            {
                string[] tempTimeFrame = s[7].Split(',');

                for (int t = 0; t < tempTimeFrame.Length; t++)
                {
                    tempTimeFrame[t] = tempTimeFrame[t].Trim();
                    int index = tempTimeFrame[t].IndexOf('(');
                    if (index != -1)
                    {
                        string state = tempTimeFrame[t].Substring(0, index);
                        foreach (KeyValuePair <string, AnimationEventState> iterator in data.States)
                        {
                            if (state.ToUpper().Equals(iterator.Key))
                            {
                                string value = tempTimeFrame[t].Substring(index, tempTimeFrame[t].Length - index);
                                value = value.Substring(1, value.Length - 2); // substring '(' & ')'

                                iterator.Value.TimeFrame = float.Parse(value);
                            }
                        }
                    }
                }
            }
            #endregion

            #region SPECIFIC LOOP
            s[9] = s[9].Trim();
            string[] tempPath = s[9].Split(',');

            for (int t = 0; t < tempPath.Length; t++)
            {
                tempPath[t] = tempPath[t].Trim();
                int index = tempPath[t].IndexOf('(');
                if (index != -1)
                {
                    string state = tempPath[t].Substring(0, index);
                    foreach (KeyValuePair <string, AnimationEventState> iterator in data.States)
                    {
                        if (state.ToUpper().Equals(iterator.Key))
                        {
                            tempPath[t] = tempPath[t].Substring(index, tempPath[t].Length - index);
                            tempPath[t] = tempPath[t].Substring(1, tempPath[t].Length - 2).Trim(); // substring '(' & ')'

                            int iSpecial = tempPath[t].IndexOf('(');
                            if (iSpecial != -1)
                            {
                                iterator.Value.isSpecificLoop = true;

                                string strSpecial = tempPath[t].Substring(iSpecial, tempPath[t].Length - iSpecial);
                                strSpecial = strSpecial.Substring(1, strSpecial.Length - 2); // substring '(' & ')'

                                string[] arr = strSpecial.Split('-');
                                iterator.Value.SpecificLoopIndex = new int[arr.Length];
                                for (int m = 0; m < arr.Length; m++)
                                {
                                    iterator.Value.SpecificLoopIndex[m] = int.Parse(arr[m]);
                                }

                                tempPath[t] = tempPath[t].Substring(0, iSpecial).Trim();
                            }

                            iterator.Value.ResourcePath = tempPath[t];
                        }
                    }
                }
            }
            #endregion

            #region VALUE
            s[10] = s[10].Trim();
            if (!s[10].Equals("none"))
            {
                string[] tempValue = s[10].Split(',');

                for (int t = 0; t < tempValue.Length; t++)
                {
                    tempValue[t] = tempValue[t].Trim();
                    int index = tempValue[t].IndexOf('(');
                    if (index != -1)
                    {
                        string state = tempValue[t].Substring(0, index);
                        foreach (KeyValuePair <string, AnimationEventState> iterator in data.States)
                        {
                            if (state.ToUpper().Equals(iterator.Key))
                            {
                                string value = tempValue[t].Substring(index, tempValue[t].Length - index);
                                value = value.Substring(1, value.Length - 2); // substring '(' & ')'
                                string[] ss = value.Trim().Split('_');
                                foreach (string eachValue in ss)
                                {
                                    string[] arrValue = eachValue.Trim().Split(':');
                                    iterator.Value.Values.Add(arrValue[0], arrValue[1]);
                                }
                            }
                        }
                    }
                }
            }
            #endregion

            SkillInfo.Add(s[1].ToUpper(), data);
        }
    }
コード例 #24
0
 public void setSkill_type(ESkillType skill_type)
 {
     this.skill_type = skill_type;
 }
コード例 #25
0
 public static object[] getColorSkillType(ESkillType type)
 {
     string s = "";
     Color result = Color.white;
     switch(type)
     {
         case ESkillType.TARGET:
             s = "Target";
             result = ColorSkillTypeDragonTarget;
             break;
         case ESkillType.BUFF:
             s = "Buff";
             result = ColorSkillTypeDragonBuff;
             break;
         case ESkillType.GLOBAL:
             s = "Global";
             result = ColorSkillTypeDragonGlobal;
             break;
     }
     return new object[] { s, result };
 }
コード例 #26
0
    void setPropertyState(ESkillType skillType, object[] data) // for destination position
    {
        if (data == null)
            return;

        if (data.Length <= 0)
            return;

        if (skillType == ESkillType.TARGET)
        {
            foreach (System.Collections.Generic.KeyValuePair<ESkillAction, SkillState> iterator in listState)
            {
                switch (iterator.Key)
                {
                    case ESkillAction.ONCE:
                        SkillStateOnce stateOnce = iterator.Value as SkillStateOnce;
                        if ((ESkillOffense)Ability == ESkillOffense.SINGLE)
                            stateOnce.enemy = (GameObject)data[0];
                        else
                            stateOnce.destPosition = (Vector3)data[0];
                        break;
                    case ESkillAction.DROP:
                        SkillStateDrop stateDrop = iterator.Value as SkillStateDrop;
                        stateDrop.destPosition = (Vector3)data[0];
                        break;
                    case ESkillAction.TRAP:
                        SkillStateTrap stateTrap = iterator.Value as SkillStateTrap;
                        stateTrap.position = (Vector3)data[0];
                        break;
                }
            }
        }
    }
コード例 #27
0
    public void initalize(string ID, ESkillType skillType, object ability, object[] data = null)
    {
        this.ID = ID;
        this.name = ID;
        this.Type = skillType;
        this.Ability = ability;

        SkillData skillData = ReadDatabase.Instance.SkillInfo[ID.ToUpper()];
        foreach (string key in skillData.States.Keys)
        {
            ESkillAction state = (ESkillAction)Extensions.GetEnum(ESkillAction.DROP.GetType(), key.ToUpper());
            listState.Add(state, getClassSkill(state));
        }

        //first element
        var enumerator = listState.Keys.GetEnumerator();
        enumerator.MoveNext();

        //set Property for state
        setPropertyState(skillType, data);
        //set Property from database
        setPropertyFromDatabase();

        FSM.Configure(this, listState[enumerator.Current]);
        stateAction = enumerator.Current;

        runResources();
    }