From 15117135d78372572acb8445c7dd199fb9f79f04 Mon Sep 17 00:00:00 2001 From: yuexin Date: Thu, 3 Dec 2020 13:43:40 +0800 Subject: [PATCH] update cfg json/ts --- configs/compound_tbl.json | 68 +--- configs/effectcard_tbl.json | 83 +---- configs/hero_tbl.json | 23 +- configs/skill_tbl.json | 443 +---------------------- configs/systemcard_tbl.json | 87 +---- configs/unit_tbl.json | 143 +------- src/cfg/parsers/BaseCfg.ts | 38 +- src/cfg/parsers/EffectCardCfg.ts | 45 ++- src/cfg/parsers/HeroCfg.ts | 26 +- src/cfg/parsers/SkillCfg.ts | 90 +++-- src/cfg/parsers/UnitCfg.ts | 61 ++-- src/rooms/logic/Handler/PlayerHandler.ts | 6 +- 12 files changed, 162 insertions(+), 951 deletions(-) diff --git a/configs/compound_tbl.json b/configs/compound_tbl.json index e31827f..2a86c77 100644 --- a/configs/compound_tbl.json +++ b/configs/compound_tbl.json @@ -1,67 +1 @@ -[ - { - "id": 99001, - "type_id": 1, - "value": 6 - }, - { - "id": 99002, - "type_id": 1, - "value": 2 - }, - { - "id": 99003, - "type_id": 2, - "value": 20 - }, - { - "id": 99004, - "type_id": 1, - "value": 2 - }, - { - "id": 99005, - "type_id": 1, - "value": 3 - }, - { - "id": 99006, - "type_id": 1, - "value": 4 - }, - { - "id": 99007, - "type_id": 1, - "value": 12 - }, - { - "id": 99008, - "type_id": 2, - "value": 8 - }, - { - "id": 99009, - "type_id": 2, - "value": 8 - }, - { - "id": 99010, - "type_id": 2, - "value": 15 - }, - { - "id": 99011, - "type_id": 2, - "value": 20 - }, - { - "id": 99012, - "type_id": 2, - "value": 5 - }, - { - "id": 99013, - "type_id": 1, - "value": 5 - } -] +[{"id":99001,"type_id":1,"value":6},{"id":99002,"type_id":1,"value":2},{"id":99003,"type_id":2,"value":20},{"id":99004,"type_id":1,"value":2},{"id":99005,"type_id":1,"value":3},{"id":99006,"type_id":1,"value":4},{"id":99007,"type_id":1,"value":12},{"id":99008,"type_id":2,"value":8},{"id":99009,"type_id":2,"value":8},{"id":99010,"type_id":2,"value":15},{"id":99011,"type_id":2,"value":20},{"id":99012,"type_id":2,"value":5},{"id":99013,"type_id":1,"value":5}] \ No newline at end of file diff --git a/configs/effectcard_tbl.json b/configs/effectcard_tbl.json index 1e49f8d..cf8f21b 100644 --- a/configs/effectcard_tbl.json +++ b/configs/effectcard_tbl.json @@ -1,82 +1 @@ -[ - { - "id": 20011, - "type_id": 1, - "count": 20, - "eff1_id": 41011, - "eff2_id": 0, - "eff3_id": 0, - "eff4_id": 0, - "eff5_id": 0 - }, - { - "id": 20021, - "type_id": 1, - "count": 20, - "eff1_id": 41021, - "eff2_id": 40131, - "eff3_id": 0, - "eff4_id": 0, - "eff5_id": 0 - }, - { - "id": 20031, - "type_id": 1, - "count": 15, - "eff1_id": 41031, - "eff2_id": 0, - "eff3_id": 0, - "eff4_id": 0, - "eff5_id": 0 - }, - { - "id": 20041, - "type_id": 1, - "count": 25, - "eff1_id": 41041, - "eff2_id": 40151, - "eff3_id": 40161, - "eff4_id": 0, - "eff5_id": 0 - }, - { - "id": 20051, - "type_id": 1, - "count": 25, - "eff1_id": 41051, - "eff2_id": 40171, - "eff3_id": 0, - "eff4_id": 0, - "eff5_id": 0 - }, - { - "id": 20061, - "type_id": 1, - "count": 20, - "eff1_id": 41061, - "eff2_id": 40181, - "eff3_id": 0, - "eff4_id": 0, - "eff5_id": 0 - }, - { - "id": 20071, - "type_id": 2, - "count": 20, - "eff1_id": 40191, - "eff2_id": 0, - "eff3_id": 0, - "eff4_id": 0, - "eff5_id": 0 - }, - { - "id": 20081, - "type_id": 2, - "count": 15, - "eff1_id": 40201, - "eff2_id": 0, - "eff3_id": 0, - "eff4_id": 0, - "eff5_id": 0 - } -] +[{"id":20011,"type_id":1,"count":20,"stageunit_id":51011,"quoteskill1id":0,"quoteskill2id":0,"quoteskill3id":0,"quoteskill4id":0},{"id":20021,"type_id":1,"count":20,"stageunit_id":51021,"quoteskill1id":40131,"quoteskill2id":0,"quoteskill3id":0,"quoteskill4id":0},{"id":20031,"type_id":1,"count":15,"stageunit_id":51031,"quoteskill1id":0,"quoteskill2id":0,"quoteskill3id":0,"quoteskill4id":0},{"id":20041,"type_id":1,"count":25,"stageunit_id":51041,"quoteskill1id":40151,"quoteskill2id":40161,"quoteskill3id":0,"quoteskill4id":0},{"id":20051,"type_id":1,"count":25,"stageunit_id":51051,"quoteskill1id":40171,"quoteskill2id":0,"quoteskill3id":0,"quoteskill4id":0},{"id":20061,"type_id":1,"count":20,"stageunit_id":51061,"quoteskill1id":40181,"quoteskill2id":0,"quoteskill3id":0,"quoteskill4id":0},{"id":20071,"type_id":2,"count":20,"stageunit_id":0,"quoteskill1id":40191,"quoteskill2id":0,"quoteskill3id":0,"quoteskill4id":0},{"id":20081,"type_id":2,"count":15,"stageunit_id":0,"quoteskill1id":40201,"quoteskill2id":0,"quoteskill3id":0,"quoteskill4id":0}] \ No newline at end of file diff --git a/configs/hero_tbl.json b/configs/hero_tbl.json index 442174a..c12d00e 100644 --- a/configs/hero_tbl.json +++ b/configs/hero_tbl.json @@ -1,22 +1 @@ -[ - { - "id": 30011, - "unit_id": 50011, - "ex_skill": 0 - }, - { - "id": 30021, - "unit_id": 50021, - "ex_skill": 0 - }, - { - "id": 30031, - "unit_id": 50031, - "ex_skill": 0 - }, - { - "id": 30041, - "unit_id": 50041, - "ex_skill": 0 - } -] \ No newline at end of file +[{"id":30011,"herounit_id":50011,"ex_skill":0},{"id":30021,"herounit_id":50021,"ex_skill":0},{"id":30031,"herounit_id":50031,"ex_skill":0},{"id":30041,"herounit_id":50041,"ex_skill":0}] \ No newline at end of file diff --git a/configs/skill_tbl.json b/configs/skill_tbl.json index b22ec2c..42c51ed 100644 --- a/configs/skill_tbl.json +++ b/configs/skill_tbl.json @@ -1,442 +1 @@ -[ - { - "id": 40011, - "skill_type": 5, - "tigger_type": 5, - "cond_type": 1, - "cond_v1": 1, - "cond_v2": 4, - "effect_type": 2, - "friendly": 1, - "target": 1, - "range": 0, - "eff_v1": 1, - "eff_v2": 4, - "eff_v3": 0, - "eff_v4": 0, - "unit_id": 0, - "unit_count": 0, - "subskill_id": 0, - "subskill_count": 0 - }, - { - "id": 40021, - "skill_type": 5, - "tigger_type": 5, - "cond_type": 1, - "cond_v1": 1, - "cond_v2": 2, - "effect_type": 2, - "friendly": 1, - "target": 1, - "range": 0, - "eff_v1": 1, - "eff_v2": 2, - "eff_v3": 0, - "eff_v4": 0, - "unit_id": 0, - "unit_count": 0, - "subskill_id": 0, - "subskill_count": 0 - }, - { - "id": 40031, - "skill_type": 5, - "tigger_type": 4, - "cond_type": 0, - "cond_v1": 0, - "cond_v2": 0, - "effect_type": 1, - "friendly": 1, - "target": 1, - "range": 0, - "eff_v1": 1, - "eff_v2": 1, - "eff_v3": 0, - "eff_v4": 0, - "unit_id": 0, - "unit_count": 0, - "subskill_id": 0, - "subskill_count": 0 - }, - { - "id": 40041, - "skill_type": 5, - "tigger_type": 6, - "cond_type": 2, - "cond_v1": 3, - "cond_v2": 4, - "effect_type": 1, - "friendly": 2, - "target": 1, - "range": 0, - "eff_v1": 1, - "eff_v2": 1, - "eff_v3": 0, - "eff_v4": 0, - "unit_id": 0, - "unit_count": 0, - "subskill_id": 0, - "subskill_count": 0 - }, - { - "id": 40051, - "skill_type": 5, - "tigger_type": 6, - "cond_type": 2, - "cond_v1": 3, - "cond_v2": 4, - "effect_type": 1, - "friendly": 1, - "target": 1, - "range": 0, - "eff_v1": 1, - "eff_v2": 1, - "eff_v3": 0, - "eff_v4": 0, - "unit_id": 0, - "unit_count": 0, - "subskill_id": 0, - "subskill_count": 0 - }, - { - "id": 40061, - "skill_type": 5, - "tigger_type": 1, - "cond_type": 4, - "cond_v1": 0, - "cond_v2": 0, - "effect_type": 4, - "friendly": 1, - "target": 1, - "range": 0, - "eff_v1": 1, - "eff_v2": 2, - "eff_v3": 0, - "eff_v4": 0, - "unit_id": 0, - "unit_count": 0, - "subskill_id": 0, - "subskill_count": 0 - }, - { - "id": 40111, - "skill_type": 5, - "tigger_type": 0, - "cond_type": 0, - "cond_v1": 0, - "cond_v2": 0, - "effect_type": 0, - "friendly": 1, - "target": 2, - "range": 1, - "eff_v1": 4, - "eff_v2": 30, - "eff_v3": 0, - "eff_v4": 0, - "unit_id": 0, - "unit_count": 0, - "subskill_id": 0, - "subskill_count": 0 - }, - { - "id": 40121, - "skill_type": 5, - "tigger_type": 0, - "cond_type": 0, - "cond_v1": 0, - "cond_v2": 0, - "effect_type": 10, - "friendly": 1, - "target": 2, - "range": 2, - "eff_v1": 0, - "eff_v2": 0, - "eff_v3": 0, - "eff_v4": 0, - "unit_id": 0, - "unit_count": 0, - "subskill_id": 0, - "subskill_count": 0 - }, - { - "id": 40131, - "skill_type": 2, - "tigger_type": 3, - "cond_type": 0, - "cond_v1": 0, - "cond_v2": 0, - "effect_type": 5, - "friendly": 1, - "target": 2, - "range": 1, - "eff_v1": 1, - "eff_v2": 20, - "eff_v3": 1, - "eff_v4": 20, - "unit_id": 0, - "unit_count": 0, - "subskill_id": 0, - "subskill_count": 0 - }, - { - "id": 40141, - "skill_type": 4, - "tigger_type": 0, - "cond_type": 0, - "cond_v1": 0, - "cond_v2": 0, - "effect_type": 6, - "friendly": 1, - "target": 2, - "range": 3, - "eff_v1": 1, - "eff_v2": 15, - "eff_v3": 1, - "eff_v4": 15, - "unit_id": 0, - "unit_count": 0, - "subskill_id": 0, - "subskill_count": 0 - }, - { - "id": 40151, - "skill_type": 2, - "tigger_type": 3, - "cond_type": 0, - "cond_v1": 0, - "cond_v2": 0, - "effect_type": 1, - "friendly": 3, - "target": 1, - "range": 0, - "eff_v1": 1, - "eff_v2": 1, - "eff_v3": 1, - "eff_v4": 1, - "unit_id": 0, - "unit_count": 0, - "subskill_id": 0, - "subskill_count": 0 - }, - { - "id": 40161, - "skill_type": 2, - "tigger_type": 3, - "cond_type": 0, - "cond_v1": 0, - "cond_v2": 0, - "effect_type": 1, - "friendly": 1, - "target": 1, - "range": 0, - "eff_v1": 1, - "eff_v2": 20, - "eff_v3": 1, - "eff_v4": 2, - "unit_id": 0, - "unit_count": 0, - "subskill_id": 0, - "subskill_count": 0 - }, - { - "id": 40171, - "skill_type": 2, - "tigger_type": 3, - "cond_type": 0, - "cond_v1": 0, - "cond_v2": 0, - "effect_type": 3, - "friendly": 4, - "target": 1, - "range": 0, - "eff_v1": 1, - "eff_v2": 1, - "eff_v3": 1, - "eff_v4": 1, - "unit_id": 0, - "unit_count": 0, - "subskill_id": 0, - "subskill_count": 0 - }, - { - "id": 40181, - "skill_type": 2, - "tigger_type": 3, - "cond_type": 0, - "cond_v1": 0, - "cond_v2": 0, - "effect_type": 7, - "friendly": 4, - "target": 2, - "range": 1, - "eff_v1": 1, - "eff_v2": 20, - "eff_v3": 1, - "eff_v4": 20, - "unit_id": 0, - "unit_count": 0, - "subskill_id": 0, - "subskill_count": 0 - }, - { - "id": 40191, - "skill_type": 1, - "tigger_type": 3, - "cond_type": 0, - "cond_v1": 0, - "cond_v2": 0, - "effect_type": 7, - "friendly": 4, - "target": 2, - "range": 1, - "eff_v1": 2, - "eff_v2": 0, - "eff_v3": 2, - "eff_v4": 0, - "unit_id": 0, - "unit_count": 0, - "subskill_id": 0, - "subskill_count": 0 - }, - { - "id": 40201, - "skill_type": 1, - "tigger_type": 3, - "cond_type": 0, - "cond_v1": 0, - "cond_v2": 0, - "effect_type": 7, - "friendly": 4, - "target": 2, - "range": 2, - "eff_v1": 1, - "eff_v2": 15, - "eff_v3": 1, - "eff_v4": 15, - "unit_id": 0, - "unit_count": 0, - "subskill_id": 0, - "subskill_count": 0 - }, - { - "id": 0, - "skill_type": 0, - "tigger_type": 0, - "cond_type": 0, - "cond_v1": 0, - "cond_v2": 0, - "effect_type": 0, - "friendly": 0, - "target": 0, - "range": 0, - "eff_v1": 0, - "eff_v2": 0, - "eff_v3": 0, - "eff_v4": 0, - "unit_id": 0, - "unit_count": 0, - "subskill_id": 0, - "subskill_count": 0 - }, - { - "id": 0, - "skill_type": 0, - "tigger_type": 0, - "cond_type": 0, - "cond_v1": 0, - "cond_v2": 0, - "effect_type": 0, - "friendly": 0, - "target": 0, - "range": 0, - "eff_v1": 0, - "eff_v2": 0, - "eff_v3": 0, - "eff_v4": 0, - "unit_id": 0, - "unit_count": 0, - "subskill_id": 0, - "subskill_count": 0 - }, - { - "id": 41011, - "skill_type": 5, - "tigger_type": 3, - "cond_type": 0, - "cond_v1": 0, - "cond_v2": 0, - "effect_type": 8, - "friendly": 1, - "target": 0, - "range": 0, - "eff_v1": 0, - "eff_v2": 0, - "eff_v3": 0, - "eff_v4": 0, - "unit_id": 51011, - "unit_count": 1, - "subskill_id": 0, - "subskill_count": 0 - }, - { - "id": 41021, - "skill_type": 5, - "tigger_type": 3, - "cond_type": 0, - "cond_v1": 0, - "cond_v2": 0, - "effect_type": 8, - "friendly": 1, - "target": 0, - "range": 0, - "eff_v1": 0, - "eff_v2": 0, - "eff_v3": 0, - "eff_v4": 0, - "unit_id": 51021, - "unit_count": 1, - "subskill_id": 0, - "subskill_count": 0 - }, - { - "id": 41031, - "skill_type": 5, - "tigger_type": 3, - "cond_type": 0, - "cond_v1": 0, - "cond_v2": 0, - "effect_type": 8, - "friendly": 1, - "target": 0, - "range": 0, - "eff_v1": 0, - "eff_v2": 0, - "eff_v3": 0, - "eff_v4": 0, - "unit_id": 51031, - "unit_count": 1, - "subskill_id": 0, - "subskill_count": 0 - }, - { - "id": 41041, - "skill_type": 5, - "tigger_type": 3, - "cond_type": 0, - "cond_v1": 0, - "cond_v2": 0, - "effect_type": 8, - "friendly": 1, - "target": 0, - "range": 0, - "eff_v1": 0, - "eff_v2": 0, - "eff_v3": 0, - "eff_v4": 0, - "unit_id": 51041, - "unit_count": 1, - "subskill_id": 0, - "subskill_count": 0 - } -] \ No newline at end of file +[{"id":40011,"skill_typeid":5,"tigger_typeid":5,"cond_typeid":1,"cond_rangeid":1,"cond_num":4,"effect_typeid":2,"friendlyid":1,"targetid":1,"rangeid":0,"eff_numtypeid":1,"eff_num":4,"edd_effid":0,"edd_effnum":0,"quoteunitid":0,"quoteunit_times":0,"quoteskillid":0,"quoteskill_times":0},{"id":40021,"skill_typeid":5,"tigger_typeid":5,"cond_typeid":1,"cond_rangeid":1,"cond_num":2,"effect_typeid":2,"friendlyid":1,"targetid":1,"rangeid":0,"eff_numtypeid":1,"eff_num":2,"edd_effid":0,"edd_effnum":0,"quoteunitid":0,"quoteunit_times":0,"quoteskillid":0,"quoteskill_times":0},{"id":40031,"skill_typeid":5,"tigger_typeid":4,"cond_typeid":0,"cond_rangeid":0,"cond_num":0,"effect_typeid":1,"friendlyid":1,"targetid":1,"rangeid":0,"eff_numtypeid":1,"eff_num":1,"edd_effid":0,"edd_effnum":0,"quoteunitid":0,"quoteunit_times":0,"quoteskillid":0,"quoteskill_times":0},{"id":40041,"skill_typeid":5,"tigger_typeid":6,"cond_typeid":2,"cond_rangeid":3,"cond_num":4,"effect_typeid":1,"friendlyid":3,"targetid":1,"rangeid":0,"eff_numtypeid":1,"eff_num":1,"edd_effid":0,"edd_effnum":0,"quoteunitid":0,"quoteunit_times":0,"quoteskillid":0,"quoteskill_times":0},{"id":40051,"skill_typeid":5,"tigger_typeid":6,"cond_typeid":2,"cond_rangeid":3,"cond_num":4,"effect_typeid":1,"friendlyid":1,"targetid":1,"rangeid":0,"eff_numtypeid":1,"eff_num":1,"edd_effid":0,"edd_effnum":0,"quoteunitid":0,"quoteunit_times":0,"quoteskillid":0,"quoteskill_times":0},{"id":40061,"skill_typeid":5,"tigger_typeid":3,"cond_typeid":0,"cond_rangeid":0,"cond_num":0,"effect_typeid":4,"friendlyid":1,"targetid":1,"rangeid":0,"eff_numtypeid":1,"eff_num":2,"edd_effid":0,"edd_effnum":0,"quoteunitid":0,"quoteunit_times":0,"quoteskillid":0,"quoteskill_times":0},{"id":40111,"skill_typeid":5,"tigger_typeid":0,"cond_typeid":0,"cond_rangeid":0,"cond_num":0,"effect_typeid":13,"friendlyid":1,"targetid":2,"rangeid":1,"eff_numtypeid":4,"eff_num":30,"edd_effid":0,"edd_effnum":0,"quoteunitid":0,"quoteunit_times":0,"quoteskillid":0,"quoteskill_times":0},{"id":40121,"skill_typeid":5,"tigger_typeid":0,"cond_typeid":0,"cond_rangeid":0,"cond_num":0,"effect_typeid":10,"friendlyid":5,"targetid":5,"rangeid":4,"eff_numtypeid":0,"eff_num":0,"edd_effid":0,"edd_effnum":0,"quoteunitid":0,"quoteunit_times":0,"quoteskillid":0,"quoteskill_times":0},{"id":40131,"skill_typeid":2,"tigger_typeid":0,"cond_typeid":0,"cond_rangeid":0,"cond_num":0,"effect_typeid":5,"friendlyid":1,"targetid":2,"rangeid":3,"eff_numtypeid":1,"eff_num":20,"edd_effid":1,"edd_effnum":20,"quoteunitid":0,"quoteunit_times":0,"quoteskillid":0,"quoteskill_times":0},{"id":40141,"skill_typeid":4,"tigger_typeid":0,"cond_typeid":0,"cond_rangeid":0,"cond_num":0,"effect_typeid":6,"friendlyid":1,"targetid":2,"rangeid":5,"eff_numtypeid":1,"eff_num":15,"edd_effid":1,"edd_effnum":15,"quoteunitid":0,"quoteunit_times":0,"quoteskillid":0,"quoteskill_times":0},{"id":40151,"skill_typeid":2,"tigger_typeid":0,"cond_typeid":0,"cond_rangeid":0,"cond_num":0,"effect_typeid":1,"friendlyid":3,"targetid":1,"rangeid":0,"eff_numtypeid":1,"eff_num":1,"edd_effid":1,"edd_effnum":1,"quoteunitid":0,"quoteunit_times":0,"quoteskillid":0,"quoteskill_times":0},{"id":40161,"skill_typeid":2,"tigger_typeid":0,"cond_typeid":0,"cond_rangeid":0,"cond_num":0,"effect_typeid":1,"friendlyid":1,"targetid":1,"rangeid":0,"eff_numtypeid":1,"eff_num":20,"edd_effid":1,"edd_effnum":2,"quoteunitid":0,"quoteunit_times":0,"quoteskillid":0,"quoteskill_times":0},{"id":40171,"skill_typeid":2,"tigger_typeid":0,"cond_typeid":0,"cond_rangeid":0,"cond_num":0,"effect_typeid":3,"friendlyid":4,"targetid":1,"rangeid":0,"eff_numtypeid":1,"eff_num":1,"edd_effid":1,"edd_effnum":1,"quoteunitid":0,"quoteunit_times":0,"quoteskillid":0,"quoteskill_times":0},{"id":40181,"skill_typeid":2,"tigger_typeid":0,"cond_typeid":0,"cond_rangeid":0,"cond_num":0,"effect_typeid":7,"friendlyid":4,"targetid":2,"rangeid":2,"eff_numtypeid":1,"eff_num":20,"edd_effid":1,"edd_effnum":20,"quoteunitid":0,"quoteunit_times":0,"quoteskillid":0,"quoteskill_times":0},{"id":40191,"skill_typeid":1,"tigger_typeid":0,"cond_typeid":0,"cond_rangeid":0,"cond_num":0,"effect_typeid":7,"friendlyid":4,"targetid":2,"rangeid":2,"eff_numtypeid":2,"eff_num":0,"edd_effid":2,"edd_effnum":0,"quoteunitid":0,"quoteunit_times":0,"quoteskillid":0,"quoteskill_times":0},{"id":40201,"skill_typeid":1,"tigger_typeid":0,"cond_typeid":0,"cond_rangeid":0,"cond_num":0,"effect_typeid":7,"friendlyid":5,"targetid":2,"rangeid":4,"eff_numtypeid":1,"eff_num":15,"edd_effid":1,"edd_effnum":15,"quoteunitid":0,"quoteunit_times":0,"quoteskillid":0,"quoteskill_times":0}] \ No newline at end of file diff --git a/configs/systemcard_tbl.json b/configs/systemcard_tbl.json index 6ef971a..2f1886c 100644 --- a/configs/systemcard_tbl.json +++ b/configs/systemcard_tbl.json @@ -1,86 +1 @@ -[ - { - "id": 10001, - "type_id": 1, - "count": 16, - "point": 1, - "weight": "20011:10|20021:10|20031:10|20041:10|20051:10|20061:10|20071:10|20081:10" - }, - { - "id": 10011, - "type_id": 1, - "count": 16, - "point": 2, - "weight": "20011:10|20021:10|20031:10|20041:10|20051:10|20061:10|20071:10|20081:10" - }, - { - "id": 10021, - "type_id": 1, - "count": 16, - "point": 3, - "weight": "20011:10|20021:10|20031:10|20041:10|20051:10|20061:10|20071:10|20081:10" - }, - { - "id": 10031, - "type_id": 1, - "count": 16, - "point": 4, - "weight": "20011:10|20021:10|20031:10|20041:10|20051:10|20061:10|20071:10|20081:10" - }, - { - "id": 10041, - "type_id": 1, - "count": 16, - "point": 5, - "weight": "20011:10|20021:10|20031:10|20041:10|20051:10|20061:10|20071:10|20081:10" - }, - { - "id": 10051, - "type_id": 1, - "count": 16, - "point": 6, - "weight": "20011:10|20021:10|20031:10|20041:10|20051:10|20061:10|20071:10|20081:10" - }, - { - "id": 10061, - "type_id": 1, - "count": 16, - "point": 7, - "weight": "20011:10|20021:10|20031:10|20041:10|20051:10|20061:10|20071:10|20081:10" - }, - { - "id": 10071, - "type_id": 1, - "count": 16, - "point": 8, - "weight": "20011:10|20021:10|20031:10|20041:10|20051:10|20061:10|20071:10|20081:10" - }, - { - "id": 10081, - "type_id": 1, - "count": 16, - "point": 9, - "weight": "20011:10|20021:10|20031:10|20041:10|20051:10|20061:10|20071:10|20081:10" - }, - { - "id": 10091, - "type_id": 1, - "count": 16, - "point": 10, - "weight": "20011:10|20021:10|20031:10|20041:10|20051:10|20061:10|20071:10|20081:10" - }, - { - "id": 10101, - "type_id": 2, - "count": 16, - "point": 100, - "weight": "" - }, - { - "id": 10111, - "type_id": 3, - "count": 8, - "point": 1000, - "weight": "" - } -] \ No newline at end of file +[{"id":10001,"type_id":1,"count":16,"point":1,"weight":"20011:10|20021:10|20031:10|20041:10|20051:10|20061:10|20071:10|20081:10"},{"id":10011,"type_id":1,"count":16,"point":2,"weight":"20011:10|20021:10|20031:10|20041:10|20051:10|20061:10|20071:10|20081:10"},{"id":10021,"type_id":1,"count":16,"point":3,"weight":"20011:10|20021:10|20031:10|20041:10|20051:10|20061:10|20071:10|20081:10"},{"id":10031,"type_id":1,"count":16,"point":4,"weight":"20011:10|20021:10|20031:10|20041:10|20051:10|20061:10|20071:10|20081:10"},{"id":10041,"type_id":1,"count":16,"point":5,"weight":"20011:10|20021:10|20031:10|20041:10|20051:10|20061:10|20071:10|20081:10"},{"id":10051,"type_id":1,"count":16,"point":6,"weight":"20011:10|20021:10|20031:10|20041:10|20051:10|20061:10|20071:10|20081:10"},{"id":10061,"type_id":1,"count":16,"point":7,"weight":"20011:10|20021:10|20031:10|20041:10|20051:10|20061:10|20071:10|20081:10"},{"id":10071,"type_id":1,"count":16,"point":8,"weight":"20011:10|20021:10|20031:10|20041:10|20051:10|20061:10|20071:10|20081:10"},{"id":10081,"type_id":1,"count":16,"point":9,"weight":"20011:10|20021:10|20031:10|20041:10|20051:10|20061:10|20071:10|20081:10"},{"id":10091,"type_id":1,"count":16,"point":10,"weight":"20011:10|20021:10|20031:10|20041:10|20051:10|20061:10|20071:10|20081:10"},{"id":10101,"type_id":2,"count":16,"point":10,"weight":""},{"id":10111,"type_id":3,"count":8,"point":10,"weight":""}] \ No newline at end of file diff --git a/configs/unit_tbl.json b/configs/unit_tbl.json index e064437..c23d350 100644 --- a/configs/unit_tbl.json +++ b/configs/unit_tbl.json @@ -1,142 +1 @@ -[ - { - "id": 50011, - "type_id": 1, - "hero_hp": 150, - "raceid": 8, - "job_id": 1, - "power_type": 1, - "power_value": 30, - "eff_type": 0, - "eff_value": 0, - "skill1_id": 40011, - "skill2_id": 0, - "skill3_id": 0 - }, - { - "id": 50021, - "type_id": 1, - "hero_hp": 150, - "raceid": 9, - "job_id": 1, - "power_type": 1, - "power_value": 30, - "eff_type": 0, - "eff_value": 0, - "skill1_id": 40031, - "skill2_id": 40021, - "skill3_id": 0 - }, - { - "id": 50031, - "type_id": 1, - "hero_hp": 150, - "raceid": 4, - "job_id": 1, - "power_type": 1, - "power_value": 30, - "eff_type": 0, - "eff_value": 0, - "skill1_id": 40041, - "skill2_id": 40051, - "skill3_id": 40021 - }, - { - "id": 50041, - "type_id": 1, - "hero_hp": 150, - "raceid": 1, - "job_id": 1, - "power_type": 1, - "power_value": 30, - "eff_type": 0, - "eff_value": 0, - "skill1_id": 40061, - "skill2_id": 40021, - "skill3_id": 0 - }, - { - "id": 0, - "type_id": 0, - "hero_hp": 0, - "raceid": 0, - "job_id": 0, - "power_type": 0, - "power_value": 0, - "eff_type": 0, - "eff_value": 0, - "skill1_id": 0, - "skill2_id": 0, - "skill3_id": 0 - }, - { - "id": 0, - "type_id": 0, - "hero_hp": 0, - "raceid": 0, - "job_id": 0, - "power_type": 0, - "power_value": 0, - "eff_type": 0, - "eff_value": 0, - "skill1_id": 0, - "skill2_id": 0, - "skill3_id": 0 - }, - { - "id": 51011, - "type_id": 2, - "hero_hp": 0, - "raceid": 5, - "job_id": 1, - "power_type": 2, - "power_value": 0, - "eff_type": 1, - "eff_value": 20, - "skill1_id": 40111, - "skill2_id": 40121, - "skill3_id": 0 - }, - { - "id": 51021, - "type_id": 2, - "hero_hp": 0, - "raceid": 1, - "job_id": 1, - "power_type": 2, - "power_value": 0, - "eff_type": 0, - "eff_value": 0, - "skill1_id": 0, - "skill2_id": 0, - "skill3_id": 0 - }, - { - "id": 51031, - "type_id": 2, - "hero_hp": 0, - "raceid": 11, - "job_id": 1, - "power_type": 3, - "power_value": 0, - "eff_type": 0, - "eff_value": 0, - "skill1_id": 40141, - "skill2_id": 0, - "skill3_id": 0 - }, - { - "id": 51041, - "type_id": 2, - "hero_hp": 0, - "raceid": 2, - "job_id": 1, - "power_type": 2, - "power_value": 0, - "eff_type": 0, - "eff_value": 0, - "skill1_id": 0, - "skill2_id": 0, - "skill3_id": 0 - } -] \ No newline at end of file +[{"id":50011,"unittypei_id":1,"hero_hp":150,"race_id":4,"job_id":1,"powernum_typeid":1,"powernum":30,"edd_effid":0,"edd_effnum":0,"base_skill1id":40011,"base_skill2id":0,"base_skill3id":0},{"id":50021,"unittypei_id":1,"hero_hp":150,"race_id":11,"job_id":1,"powernum_typeid":1,"powernum":30,"edd_effid":0,"edd_effnum":0,"base_skill1id":40031,"base_skill2id":40021,"base_skill3id":0},{"id":50031,"unittypei_id":1,"hero_hp":150,"race_id":6,"job_id":1,"powernum_typeid":1,"powernum":30,"edd_effid":0,"edd_effnum":0,"base_skill1id":40041,"base_skill2id":40051,"base_skill3id":40021},{"id":50041,"unittypei_id":1,"hero_hp":150,"race_id":1,"job_id":1,"powernum_typeid":1,"powernum":30,"edd_effid":0,"edd_effnum":0,"base_skill1id":40061,"base_skill2id":40021,"base_skill3id":0},{"id":0,"unittypei_id":0,"hero_hp":0,"race_id":0,"job_id":0,"powernum_typeid":0,"powernum":0,"edd_effid":0,"edd_effnum":0,"base_skill1id":0,"base_skill2id":0,"base_skill3id":0},{"id":0,"unittypei_id":0,"hero_hp":0,"race_id":0,"job_id":0,"powernum_typeid":0,"powernum":0,"edd_effid":0,"edd_effnum":0,"base_skill1id":0,"base_skill2id":0,"base_skill3id":0},{"id":51011,"unittypei_id":2,"hero_hp":0,"race_id":9,"job_id":1,"powernum_typeid":2,"powernum":0,"edd_effid":6,"edd_effnum":20,"base_skill1id":40111,"base_skill2id":40121,"base_skill3id":0},{"id":51021,"unittypei_id":2,"hero_hp":0,"race_id":1,"job_id":1,"powernum_typeid":2,"powernum":0,"edd_effid":0,"edd_effnum":0,"base_skill1id":0,"base_skill2id":0,"base_skill3id":0},{"id":51031,"unittypei_id":2,"hero_hp":0,"race_id":13,"job_id":1,"powernum_typeid":3,"powernum":0,"edd_effid":0,"edd_effnum":0,"base_skill1id":40141,"base_skill2id":0,"base_skill3id":0},{"id":51041,"unittypei_id":2,"hero_hp":0,"race_id":2,"job_id":1,"powernum_typeid":2,"powernum":0,"edd_effid":0,"edd_effnum":0,"base_skill1id":0,"base_skill2id":0,"base_skill3id":0}] \ No newline at end of file diff --git a/src/cfg/parsers/BaseCfg.ts b/src/cfg/parsers/BaseCfg.ts index df9ccbb..b3a4420 100644 --- a/src/cfg/parsers/BaseCfg.ts +++ b/src/cfg/parsers/BaseCfg.ts @@ -1,25 +1,25 @@ import {Cfg} from "../../common/DataParser"; - export class BaseCfg implements Cfg{ - /** - * 字段ID - */ - public id: number; - /** - * 字段数值 - */ - public value: number; - /** - * 数值类型 - */ - public type_id: number; + name: "BaseCfg"; - public decode(data: any) { + public id: number; + public type_id: number; + public value: number; + + public decode(data: any) { this.id = data.id; - this.value = data.value; this.type_id = data.type_id; - } -} - - + this.value = data.value; + }; + + public isOK (uniqueID: number, param1: any, param2: any): boolean { + if((param1 == undefined || param1 == null) && (param2 == undefined || param2 == null)){ + return this.id == uniqueID; + } + if(param2 == undefined || param2 == null){ + return this.id == uniqueID && this.id == param1; + } + return this.id == uniqueID && this.id == param1 && this.id == param2; + }; +}; \ No newline at end of file diff --git a/src/cfg/parsers/EffectCardCfg.ts b/src/cfg/parsers/EffectCardCfg.ts index 311479d..8c49bef 100644 --- a/src/cfg/parsers/EffectCardCfg.ts +++ b/src/cfg/parsers/EffectCardCfg.ts @@ -1,24 +1,35 @@ import {Cfg} from "../../common/DataParser"; - export class EffectCardCfg implements Cfg{ - public id: number; - public count: number; - public type_id: number; - public eff1_id: number; - public eff2_id: number; - public eff3_id: number; - public eff4_id: number; - public eff5_id: number; + name: "EffectCardCfg"; - public decode(data: any) { + public id: number; + public type_id: number; + public count: number; + public stageunit_id: number; + public quoteskill1id: number; + public quoteskill2id: number; + public quoteskill3id: number; + public quoteskill4id: number; + + public decode(data: any) { this.id = data.id; this.type_id = data.type_id; - this.eff1_id = data.eff1_id; - this.eff2_id = data.eff2_id; - this.eff3_id = data.eff3_id; - this.eff4_id = data.eff4_id; - this.eff5_id = data.eff5_id; this.count = data.count; - } -} + this.stageunit_id = data.stageunit_id; + this.quoteskill1id = data.quoteskill1id; + this.quoteskill2id = data.quoteskill2id; + this.quoteskill3id = data.quoteskill3id; + this.quoteskill4id = data.quoteskill4id; + }; + + public isOK (uniqueID: number, param1: any, param2: any): boolean { + if((param1 == undefined || param1 == null) && (param2 == undefined || param2 == null)){ + return this.id == uniqueID; + } + if(param2 == undefined || param2 == null){ + return this.id == uniqueID && this.id == param1; + } + return this.id == uniqueID && this.id == param1 && this.id == param2; + }; +}; \ No newline at end of file diff --git a/src/cfg/parsers/HeroCfg.ts b/src/cfg/parsers/HeroCfg.ts index 91d2e2a..aa50c92 100644 --- a/src/cfg/parsers/HeroCfg.ts +++ b/src/cfg/parsers/HeroCfg.ts @@ -1,13 +1,25 @@ import {Cfg} from "../../common/DataParser"; export class HeroCfg implements Cfg{ - public id: number; - public unit_id: number; - public ex_skill: number; + name: "HeroCfg"; - public decode(data: any) { + public id: number; + public herounit_id: number; + public ex_skill: number; + + public decode(data: any) { this.id = data.id; - this.unit_id = data.unit_id; + this.herounit_id = data.herounit_id; this.ex_skill = data.ex_skill; - } -} + }; + + public isOK (uniqueID: number, param1: any, param2: any): boolean { + if((param1 == undefined || param1 == null) && (param2 == undefined || param2 == null)){ + return this.id == uniqueID; + } + if(param2 == undefined || param2 == null){ + return this.id == uniqueID && this.id == param1; + } + return this.id == uniqueID && this.id == param1 && this.id == param2; + }; +}; \ No newline at end of file diff --git a/src/cfg/parsers/SkillCfg.ts b/src/cfg/parsers/SkillCfg.ts index 0e4bbc3..439a045 100644 --- a/src/cfg/parsers/SkillCfg.ts +++ b/src/cfg/parsers/SkillCfg.ts @@ -1,43 +1,55 @@ import {Cfg} from "../../common/DataParser"; - export class SkillCfg implements Cfg{ - public id: number; - public skill_type: number; - public tigger_type: number; - public cond_type: number; - public cond_v1: number; - public cond_v2: number; - public effect_type: number; - public friendly: number; - public target: number; - public range: number; - public eff_v1: number; - public eff_v2: number; - public eff_v3: number; - public eff_v4: number; - public unit_id: number; - public unit_count: number; - public subskill_id: number; - public subskill_count: number; - public decode(data: any) { + name: "SkillCfg"; + + public id: number; + public skill_typeid: number; + public tigger_typeid: number; + public cond_typeid: number; + public cond_rangeid: number; + public cond_num: number; + public effect_typeid: number; + public friendlyid: number; + public targetid: number; + public rangeid: number; + public eff_numtypeid: number; + public eff_num: number; + public edd_effid: number; + public edd_effnum: number; + public quoteunitid: number; + public quoteunit_times: number; + public quoteskillid: number; + public quoteskill_times: number; + + public decode(data: any) { this.id = data.id; - this.skill_type = data.skill_type; - this.tigger_type = data.tigger_type; - this.cond_type = data.cond_type; - this.cond_v1 = data.cond_v1; - this.cond_v2 = data.cond_v2; - this.effect_type = data.effect_type; - this.friendly = data.friendly; - this.target = data.target; - this.range = data.range; - this.eff_v1 = data.eff_v1; - this.eff_v2 = data.eff_v2; - this.eff_v3 = data.eff_v3; - this.eff_v4 = data.eff_v4; - this.unit_id = data.unit_id; - this.unit_count = data.unit_count; - this.subskill_id = data.subskill_id; - this.subskill_count = data.subskill_count; - } -} + this.skill_typeid = data.skill_typeid; + this.tigger_typeid = data.tigger_typeid; + this.cond_typeid = data.cond_typeid; + this.cond_rangeid = data.cond_rangeid; + this.cond_num = data.cond_num; + this.effect_typeid = data.effect_typeid; + this.friendlyid = data.friendlyid; + this.targetid = data.targetid; + this.rangeid = data.rangeid; + this.eff_numtypeid = data.eff_numtypeid; + this.eff_num = data.eff_num; + this.edd_effid = data.edd_effid; + this.edd_effnum = data.edd_effnum; + this.quoteunitid = data.quoteunitid; + this.quoteunit_times = data.quoteunit_times; + this.quoteskillid = data.quoteskillid; + this.quoteskill_times = data.quoteskill_times; + }; + + public isOK (uniqueID: number, param1: any, param2: any): boolean { + if((param1 == undefined || param1 == null) && (param2 == undefined || param2 == null)){ + return this.id == uniqueID; + } + if(param2 == undefined || param2 == null){ + return this.id == uniqueID && this.id == param1; + } + return this.id == uniqueID && this.id == param1 && this.id == param2; + }; +}; \ No newline at end of file diff --git a/src/cfg/parsers/UnitCfg.ts b/src/cfg/parsers/UnitCfg.ts index 9aa7a4b..68ca71b 100644 --- a/src/cfg/parsers/UnitCfg.ts +++ b/src/cfg/parsers/UnitCfg.ts @@ -1,32 +1,43 @@ import {Cfg} from "../../common/DataParser"; - export class UnitCfg implements Cfg{ - public id: number; - public type_id: number; - public hero_hp: number; - public raceid: number; - public job_id: number; - public power_type: number; - public power_value: number; - public eff_type: number; - public eff_value: number; - public skill1_id: number; - public skill2_id: number; - public skill3_id: number; + name: "UnitCfg"; - public decode(data: any) { + public id: number; + public unittypei_id: number; + public hero_hp: number; + public race_id: number; + public job_id: number; + public powernum_typeid: number; + public powernum: number; + public edd_effid: number; + public edd_effnum: number; + public base_skill1id: number; + public base_skill2id: number; + public base_skill3id: number; + + public decode(data: any) { this.id = data.id; - this.type_id = data.type_id; + this.unittypei_id = data.unittypei_id; this.hero_hp = data.hero_hp; - this.raceid = data.raceid; + this.race_id = data.race_id; this.job_id = data.job_id; - this.power_type = data.power_type; - this.power_value = data.power_value; - this.eff_type = data.eff_type; - this.eff_value = data.eff_value; - this.skill1_id = data.skill1_id; - this.skill2_id = data.skill2_id; - this.skill3_id = data.skill3_id; - } -} + this.powernum_typeid = data.powernum_typeid; + this.powernum = data.powernum; + this.edd_effid = data.edd_effid; + this.edd_effnum = data.edd_effnum; + this.base_skill1id = data.base_skill1id; + this.base_skill2id = data.base_skill2id; + this.base_skill3id = data.base_skill3id; + }; + + public isOK (uniqueID: number, param1: any, param2: any): boolean { + if((param1 == undefined || param1 == null) && (param2 == undefined || param2 == null)){ + return this.id == uniqueID; + } + if(param2 == undefined || param2 == null){ + return this.id == uniqueID && this.id == param1; + } + return this.id == uniqueID && this.id == param1 && this.id == param2; + }; +}; \ No newline at end of file diff --git a/src/rooms/logic/Handler/PlayerHandler.ts b/src/rooms/logic/Handler/PlayerHandler.ts index d9ea99b..e4ced83 100644 --- a/src/rooms/logic/Handler/PlayerHandler.ts +++ b/src/rooms/logic/Handler/PlayerHandler.ts @@ -32,9 +32,9 @@ export class PlayerHandler { this._playercfg = CfgMan.findPlayerCfg(this._player.heroId); this._self = new PetHandler(); this._self.init(null, this); - let lst = this._playercfg.exSkill? [this._playercfg.exSkill]: null; - this._self.setParam({id: this._playercfg.unitId, exskillid: lst}); - this._unitcfg = this._playercfg && CfgMan.findUnitCfg(this._playercfg.unitId); + let lst = this._playercfg.ex_skill? [this._playercfg.ex_skill]: null; + this._self.setParam({id: this._playercfg.herounit_id, exskillid: lst}); + this._unitcfg = this._playercfg && CfgMan.findUnitCfg(this._playercfg.herounit_id); }; public getCurrCardCount(){