Merge branch 'master' of http://60.1.1.230/backend/jieling_server
Conflicts: serverlogic/src/main/java/com/ljsd/jieling/logic/hero/HeroLogic.javaback_recharge
commit
82102d009b
|
@ -0,0 +1,2 @@
|
|||
Id ComonpentsId Stage Cost BaseAttribute
|
||||
int int int mut,int#int,2 mut,int#int,2
|
|
@ -0,0 +1,58 @@
|
|||
Id OpenRules ComonpentList
|
||||
int mut,int#int,2 mut,int#int,1
|
||||
0 null null
|
||||
0 null null
|
||||
0 null null
|
||||
0 null null
|
||||
0 null null
|
||||
0 null null
|
||||
0 null null
|
||||
0 null null
|
||||
0 null null
|
||||
0 null null
|
||||
0 null null
|
||||
0 null null
|
||||
0 null null
|
||||
0 null null
|
||||
0 null null
|
||||
0 null null
|
||||
0 null null
|
||||
0 null null
|
||||
0 null null
|
||||
0 null null
|
||||
0 null null
|
||||
0 null null
|
||||
0 null null
|
||||
0 null null
|
||||
0 null null
|
||||
0 null null
|
||||
0 null null
|
||||
0 null null
|
||||
0 null null
|
||||
0 null null
|
||||
0 null null
|
||||
0 null null
|
||||
0 null null
|
||||
0 null null
|
||||
0 null null
|
||||
0 null null
|
||||
0 null null
|
||||
0 null null
|
||||
0 null null
|
||||
0 null null
|
||||
0 null null
|
||||
0 null null
|
||||
0 null null
|
||||
0 null null
|
||||
0 null null
|
||||
0 null null
|
||||
0 null null
|
||||
0 null null
|
||||
0 null null
|
||||
0 null null
|
||||
0 null null
|
||||
0 null null
|
||||
0 null null
|
||||
0 null null
|
||||
0 null null
|
||||
0 null null
|
|
@ -0,0 +1,2 @@
|
|||
Id DifferDemonsId SkillId Cost
|
||||
int int int mut,int#int,2
|
|
@ -1,4 +1,119 @@
|
|||
Id ProfessionLimit Position PropertyMin PropertyMax Pool SecondNumMin SecondNumMax SkillId IfClear
|
||||
int int int mut,int#int,1 mut,int#int,1 int int int int int
|
||||
3001 0 1 1#100 1#200 1 1 1 0 1
|
||||
3002 0 0 null null 0 0 0 0 0
|
||||
3001 1501 1 2#42 2#70 1 0 0 0 0
|
||||
3002 1501 1 2#42 2#70 1 0 0 0 0
|
||||
3003 1502 1 2#42 2#70 1 0 0 0 0
|
||||
3004 1502 1 2#42 2#70 1 0 0 0 0
|
||||
3005 1503 1 2#42 2#70 1 0 0 0 0
|
||||
3006 1503 1 2#42 2#70 1 0 0 0 0
|
||||
3007 1504 1 2#42 2#70 1 0 0 0 0
|
||||
3008 1504 1 2#42 2#70 1 0 0 0 0
|
||||
3009 1505 1 2#42 2#70 1 0 0 0 0
|
||||
3010 1505 1 2#42 2#70 1 0 0 0 0
|
||||
3011 0 2 3#43 3#72 1 0 0 0 0
|
||||
3012 0 2 3#43 3#72 1 0 0 0 0
|
||||
3013 0 2 4#40 4#67 1 0 0 0 0
|
||||
3014 0 2 4#40 4#67 1 0 0 0 0
|
||||
3015 0 4 5#24 5#28 1 0 0 0 0
|
||||
3016 0 4 5#24 5#28 1 0 0 0 0
|
||||
3017 0 3 1#460 1#767 1 0 0 0 0
|
||||
3018 0 3 1#460 1#767 1 0 0 0 0
|
||||
3101 1501 1 2#56 2#93 1 0 1 0 0
|
||||
3102 1501 1 2#56 2#93 1 0 1 0 0
|
||||
3103 1502 1 2#56 2#93 1 0 1 0 0
|
||||
3104 1502 1 2#56 2#93 1 0 1 0 0
|
||||
3105 1503 1 2#56 2#93 1 0 1 0 0
|
||||
3106 1503 1 2#56 2#93 1 0 1 0 0
|
||||
3107 1504 1 2#56 2#93 1 0 1 0 0
|
||||
3108 1504 1 2#56 2#93 1 0 1 0 0
|
||||
3109 1505 1 2#56 2#93 1 0 1 0 0
|
||||
3110 1505 1 2#56 2#93 1 0 1 0 0
|
||||
3111 0 2 3#58 3#96 2 0 1 0 0
|
||||
3112 0 2 3#58 3#96 2 0 1 0 0
|
||||
3113 0 2 4#54 4#90 2 0 1 0 0
|
||||
3114 0 2 4#54 4#90 2 0 1 0 0
|
||||
3115 0 4 5#48 5#56 3 0 1 0 0
|
||||
3116 0 4 5#48 5#56 3 0 1 0 0
|
||||
3117 0 3 1#616 1#1027 4 0 1 0 0
|
||||
3118 0 3 1#616 1#1027 4 0 1 0 0
|
||||
3201 1501 1 2#72 2#120 5 1 3 0 1
|
||||
3202 1501 1 2#72 2#120 5 1 3 0 1
|
||||
3203 1502 1 2#72 2#120 5 1 3 0 1
|
||||
3204 1502 1 2#72 2#120 5 1 3 0 1
|
||||
3205 1503 1 2#72 2#120 5 1 3 0 1
|
||||
3206 1503 1 2#72 2#120 5 1 3 0 1
|
||||
3207 1504 1 2#72 2#120 5 1 3 0 1
|
||||
3208 1504 1 2#72 2#120 5 1 3 0 1
|
||||
3209 1505 1 2#72 2#120 5 1 3 0 1
|
||||
3210 1505 1 2#72 2#120 5 1 3 0 1
|
||||
3211 0 2 3#74 3#124 6 1 3 0 1
|
||||
3212 0 2 3#74 3#124 6 1 3 0 1
|
||||
3213 0 2 4#70 4#116 6 1 3 0 1
|
||||
3214 0 2 4#70 4#116 6 1 3 0 1
|
||||
3215 0 4 5#72 5#84 7 1 3 0 1
|
||||
3216 0 4 5#72 5#84 7 1 3 0 1
|
||||
3217 0 3 1#792 1#1320 8 1 3 0 1
|
||||
3218 0 3 1#792 1#1320 8 1 3 0 1
|
||||
3301 1501 1 2#383 2#638 9 2 4 0 1
|
||||
3302 1501 1 2#383 2#638 9 2 4 0 1
|
||||
3303 1502 1 2#383 2#638 9 2 4 0 1
|
||||
3304 1502 1 2#383 2#638 9 2 4 0 1
|
||||
3305 1503 1 2#383 2#638 9 2 4 0 1
|
||||
3306 1503 1 2#383 2#638 9 2 4 0 1
|
||||
3307 1504 1 2#383 2#638 9 2 4 0 1
|
||||
3308 1504 1 2#383 2#638 9 2 4 0 1
|
||||
3309 1505 1 2#383 2#638 9 2 4 0 1
|
||||
3310 1505 1 2#383 2#638 9 2 4 0 1
|
||||
3311 0 2 3#396 3#659 10 2 4 0 1
|
||||
3312 0 2 3#396 3#659 10 2 4 0 1
|
||||
3313 0 2 4#370 4#617 10 2 4 0 1
|
||||
3314 0 2 4#370 4#617 10 2 4 0 1
|
||||
3315 0 4 5#96 5#113 11 2 4 0 1
|
||||
3316 0 4 5#96 5#113 11 2 4 0 1
|
||||
3317 0 3 1#4212 1#7020 12 2 4 0 1
|
||||
3318 0 3 1#4212 1#7020 12 2 4 0 1
|
||||
3319 1501 1 2#383 2#638 9 2 4 0 1
|
||||
3320 1501 1 2#383 2#638 9 2 4 0 1
|
||||
3321 1502 1 2#383 2#638 9 2 4 0 1
|
||||
3322 1502 1 2#383 2#638 9 2 4 0 1
|
||||
3323 1503 1 2#383 2#638 9 2 4 0 1
|
||||
3324 1503 1 2#383 2#638 9 2 4 0 1
|
||||
3325 1504 1 2#383 2#638 9 2 4 0 1
|
||||
3326 1504 1 2#383 2#638 9 2 4 0 1
|
||||
3327 1505 1 2#383 2#638 9 2 4 0 1
|
||||
3328 1505 1 2#383 2#638 9 2 4 0 1
|
||||
3329 0 2 3#396 3#659 10 2 4 0 1
|
||||
3330 0 2 3#396 3#659 10 2 4 0 1
|
||||
3331 0 2 4#370 4#617 10 2 4 0 1
|
||||
3332 0 2 4#370 4#617 10 2 4 0 1
|
||||
3333 0 4 5#96 5#113 11 2 4 0 1
|
||||
3334 0 4 5#96 5#113 11 2 4 0 1
|
||||
3335 0 3 1#4212 1#7020 12 2 4 0 1
|
||||
3336 0 3 1#4212 1#7020 12 2 4 0 1
|
||||
4001 1501 1 2#72 2#120 5 1 3 0 0
|
||||
4002 1502 1 2#72 2#120 5 1 3 0 0
|
||||
4003 1503 1 2#72 2#120 5 1 3 0 0
|
||||
4004 1504 1 2#72 2#120 5 1 3 0 0
|
||||
4005 1505 1 2#72 2#120 5 1 3 0 0
|
||||
4006 0 2 3#74 3#124 6 1 3 0 0
|
||||
4007 0 2 4#70 4#116 6 1 3 0 0
|
||||
4008 0 4 5#72 5#84 7 1 3 0 0
|
||||
4009 0 3 1#792 1#1320 8 1 3 0 0
|
||||
4101 1501 1 2#383 2#638 9 2 4 0 0
|
||||
4102 1501 1 2#383 2#638 9 2 4 0 0
|
||||
4103 1502 1 2#383 2#638 9 2 4 0 0
|
||||
4104 1502 1 2#383 2#638 9 2 4 0 0
|
||||
4105 1503 1 2#383 2#638 9 2 4 0 0
|
||||
4106 1503 1 2#383 2#638 9 2 4 0 0
|
||||
4107 1504 1 2#383 2#638 9 2 4 0 0
|
||||
4108 1504 1 2#383 2#638 9 2 4 0 0
|
||||
4109 1505 1 2#383 2#638 9 2 4 0 0
|
||||
4110 1505 1 2#383 2#638 9 2 4 0 0
|
||||
4111 0 2 3#396 3#659 10 2 4 0 0
|
||||
4112 0 2 3#396 3#659 10 2 4 0 0
|
||||
4113 0 2 4#370 4#617 10 2 4 0 0
|
||||
4114 0 2 4#370 4#617 10 2 4 0 0
|
||||
4115 0 4 5#96 5#113 11 2 4 0 0
|
||||
4116 0 4 5#96 5#113 11 2 4 0 0
|
||||
4117 0 3 1#4212 1#7020 12 2 4 0 0
|
||||
4118 0 3 1#4212 1#7020 12 2 4 0 0
|
||||
|
|
|
@ -1,3 +1,78 @@
|
|||
id PropertyId Min Max PoolNum Weight
|
||||
int int int int int int
|
||||
1 101 100 200 1 100
|
||||
1 5 11 18 1 100
|
||||
2 54 5 5 1 100
|
||||
3 53 5 5 1 100
|
||||
4 1 235 392 2 100
|
||||
5 2 19 32 2 100
|
||||
6 53 5 5 2 100
|
||||
7 54 5 5 2 100
|
||||
8 1 268 448 3 100
|
||||
9 2 17 29 3 100
|
||||
10 3 9 15 3 100
|
||||
11 4 12 20 3 100
|
||||
12 3 26 43 4 100
|
||||
13 4 27 45 4 100
|
||||
14 5 15 26 4 100
|
||||
15 5 16 19 5 100
|
||||
16 54 8 8 5 100
|
||||
17 53 8 8 5 100
|
||||
18 56 25 25 5 100
|
||||
19 55 5 5 5 100
|
||||
20 1 302 504 6 100
|
||||
21 2 25 42 6 100
|
||||
22 53 8 8 6 100
|
||||
23 54 8 8 6 100
|
||||
24 1 345 576 7 100
|
||||
25 2 22 38 7 100
|
||||
26 3 12 20 7 100
|
||||
27 4 15 26 7 100
|
||||
28 55 5 5 7 100
|
||||
29 56 10 10 7 100
|
||||
30 3 33 56 8 100
|
||||
31 4 34 58 8 100
|
||||
32 5 23 27 8 100
|
||||
33 56 10 10 8 100
|
||||
34 5 22 26 9 100
|
||||
35 54 10 10 9 100
|
||||
36 53 10 10 9 100
|
||||
37 56 40 40 9 100
|
||||
38 55 15 15 9 100
|
||||
39 101 8 15 9 100
|
||||
40 102 8 15 9 100
|
||||
41 103 8 15 9 100
|
||||
42 104 8 15 9 100
|
||||
43 105 8 15 9 100
|
||||
44 106 8 15 9 100
|
||||
45 1 1608 2680 10 100
|
||||
46 2 134 223 10 100
|
||||
47 53 10 10 10 100
|
||||
48 54 10 10 10 100
|
||||
49 107 8 15 10 100
|
||||
50 108 8 15 10 100
|
||||
51 109 8 15 10 100
|
||||
52 110 8 15 10 100
|
||||
53 111 8 15 10 100
|
||||
54 112 8 15 10 100
|
||||
55 1 1837 3063 11 100
|
||||
56 2 121 202 11 100
|
||||
57 3 63 106 11 100
|
||||
58 4 82 138 11 100
|
||||
59 55 5 5 11 100
|
||||
60 56 15 15 11 100
|
||||
61 107 5 5 11 100
|
||||
62 108 5 5 11 100
|
||||
63 109 5 5 11 100
|
||||
64 110 5 5 11 100
|
||||
65 111 5 5 11 100
|
||||
66 112 5 5 11 100
|
||||
67 3 5 5 12 100
|
||||
68 4 185 308 12 100
|
||||
69 5 31 36 12 100
|
||||
70 56 25 25 12 100
|
||||
71 101 5 10 12 100
|
||||
72 102 5 10 12 100
|
||||
73 103 5 10 12 100
|
||||
74 104 5 10 12 100
|
||||
75 105 5 10 12 100
|
||||
76 106 5 10 12 100
|
||||
|
|
|
@ -1,12 +1,24 @@
|
|||
Id Type RankupPara LimitLevel OpenLevel LimitStar OpenStar ConsumeMaterial
|
||||
int int float int int int int mut,int#int,2
|
||||
1 1 2000 30 40 3 3 14#10000|4#20
|
||||
2 1 5000 40 50 3 3 14#20000|4#40
|
||||
3 1 9000 50 60 3 3 14#30000|4#100
|
||||
4 1 14000 60 80 4 4 14#30000|4#300
|
||||
5 1 20000 80 100 5 5 14#70000|4#1000
|
||||
6 1 60000 100 140 5 6 14#120000|4#0
|
||||
7 2 2000 140 160 6 7 14#0|4#2000
|
||||
8 2 4000 160 180 7 8 14#0|4#3000
|
||||
9 2 7000 180 200 8 9 14#0|4#4000
|
||||
10 2 10000 200 250 9 10 14#0|4#10000
|
||||
Id Type RankupPara LimitLevel OpenLevel LimitStar OpenStar ConsumeMaterial Star
|
||||
int int float int int int int mut,int#int,2 int
|
||||
1 1 2000 30 40 5 5 14#10000|4#20 5
|
||||
2 1 5000 40 50 5 5 14#20000|4#40 5
|
||||
3 1 9000 50 60 5 5 14#30000|4#100 5
|
||||
4 1 14000 60 80 5 5 14#30000|4#300 5
|
||||
5 1 20000 80 100 5 5 14#70000|4#1000 5
|
||||
6 1 60000 100 140 5 6 14#120000|4#0 5
|
||||
7 2 2000 140 160 6 7 14#0|4#2000 5
|
||||
8 2 4000 160 180 7 8 14#0|4#3000 5
|
||||
9 2 7000 180 200 8 9 14#0|4#4000 5
|
||||
10 2 10000 200 250 9 10 14#0|4#10000 5
|
||||
51 1 2000 30 40 4 4 14#10000|4#20 4
|
||||
52 1 5000 40 50 4 4 14#20000|4#40 4
|
||||
53 1 9000 50 60 4 4 14#30000|4#100 4
|
||||
54 1 14000 60 80 4 4 14#30000|4#300 4
|
||||
55 1 20000 80 100 4 5 14#70000|4#1000 4
|
||||
56 1 60000 100 140 5 6 14#120000|4#0 4
|
||||
57 2 2000 140 160 6 7 14#0|4#2000 4
|
||||
58 2 4000 160 180 7 8 14#0|4#3000 4
|
||||
59 2 7000 180 200 8 9 14#0|4#4000 4
|
||||
101 1 2000 30 40 3 3 14#10000|4#20 3
|
||||
102 1 5000 40 50 3 3 14#20000|4#40 3
|
||||
103 1 9000 50 60 3 3 14#30000|4#100 3
|
||||
|
|
|
@ -1,58 +1,26 @@
|
|||
Id PropertyId Name Info
|
||||
int int string string
|
||||
1 1 Hp 生命值
|
||||
2 2 Attack 攻击力
|
||||
3 3 PhysicalDefence 护甲
|
||||
4 4 MagicDefence 魔抗
|
||||
5 5 Speed 速度
|
||||
6 51 DamageBocusFactor 伤害加成百分比
|
||||
7 52 DamageReduceFactor 伤害减免百分比
|
||||
8 53 Hit 效果命中率
|
||||
9 54 Dodge 效果抵抗率
|
||||
10 55 CritFactor 暴击率
|
||||
11 56 CritDamageFactor 暴伤
|
||||
12 57 TreatFacter 回复系数
|
||||
13 101 FireDamageBonusFactor 火攻(%)
|
||||
14 102 WindDamageBonusFactor 风攻(%)
|
||||
15 103 WaterDamageBonusFactor 水攻(%)
|
||||
16 104 LandDamageBonusFactor 地攻(%)
|
||||
17 105 LightDamageBonusFactor 光攻(%)
|
||||
18 106 DarkDamageBonusFactor 暗攻(%)
|
||||
19 107 FireDamageReduceFactor 火抗(%)
|
||||
20 108 WindDamageReduceFactor 风抗(%)
|
||||
21 109 WaterDamageReduceFactor 水抗(%)
|
||||
22 110 LandDamageReduceFactor 地抗(%)
|
||||
23 111 LightDamageReduceFactor 光抗(%)
|
||||
24 112 DarkDamageReduceFactor 暗抗(%)
|
||||
0 null
|
||||
0 null
|
||||
0 null
|
||||
0 null
|
||||
0 null
|
||||
0 null
|
||||
0 null
|
||||
0 null
|
||||
0 null
|
||||
0 null
|
||||
0 null
|
||||
0 null
|
||||
0 null
|
||||
0 null
|
||||
0 null
|
||||
0 null
|
||||
0 null
|
||||
0 null
|
||||
0 null
|
||||
0 null
|
||||
0 null
|
||||
0 null
|
||||
0 null
|
||||
0 null
|
||||
0 null
|
||||
0 null
|
||||
0 null
|
||||
0 null
|
||||
0 null
|
||||
0 null
|
||||
0 null
|
||||
0 null
|
||||
Id PropertyId Style Score
|
||||
int int int float
|
||||
1 1 1 0
|
||||
2 2 1 10
|
||||
3 3 1 5
|
||||
4 4 1 5
|
||||
5 5 1 5
|
||||
6 51 2 0
|
||||
7 52 2 0
|
||||
8 53 2 5
|
||||
9 54 2 5
|
||||
10 55 2 5
|
||||
11 56 2 0
|
||||
12 57 2 0
|
||||
13 101 2 30
|
||||
14 102 2 30
|
||||
15 103 2 30
|
||||
16 104 2 30
|
||||
17 105 2 30
|
||||
18 106 2 30
|
||||
19 107 2 30
|
||||
20 108 2 30
|
||||
21 109 2 30
|
||||
22 110 2 30
|
||||
23 111 2 30
|
||||
24 112 2 30
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package com.ljsd.jieling.config;
|
||||
|
||||
import com.ljsd.jieling.core.GlobalsDef;
|
||||
import com.ljsd.jieling.logic.STableManager;
|
||||
import com.ljsd.jieling.logic.Table;
|
||||
|
||||
|
@ -9,7 +10,7 @@ import java.util.TreeMap;
|
|||
|
||||
@Table(name = "HeroRankupConfig")
|
||||
public class SCHeroRankUpConfig implements BaseConfig{
|
||||
public static Map<Integer,Map<Integer,SCHeroRankUpConfig>> scHeroRankUpConfigByType;
|
||||
public static Map<Integer,Map<Integer,Map<Integer,SCHeroRankUpConfig>>> scHeroRankUpConfigByStar;
|
||||
|
||||
private int id;
|
||||
|
||||
|
@ -27,26 +28,30 @@ public class SCHeroRankUpConfig implements BaseConfig{
|
|||
|
||||
private int consumeMaterial[][];
|
||||
|
||||
private int star;
|
||||
|
||||
@Override
|
||||
public void init() throws Exception {
|
||||
Map<Integer,Map<Integer,SCHeroRankUpConfig>> result = new HashMap<>();
|
||||
Map<Integer,Map<Integer,Map<Integer,SCHeroRankUpConfig>>> result = new HashMap<>();
|
||||
Map<Integer, SCHeroRankUpConfig> config = STableManager.getConfig(SCHeroRankUpConfig.class);
|
||||
for(SCHeroRankUpConfig scHeroRankUpConfig: config.values()){
|
||||
int type = scHeroRankUpConfig.getType();
|
||||
if(!result.containsKey(type)){
|
||||
result.put(type,new TreeMap<>());
|
||||
}
|
||||
if(type == 1){
|
||||
result.get(type).put(scHeroRankUpConfig.getLimitLevel(),scHeroRankUpConfig);
|
||||
}else{
|
||||
result.get(type).put(scHeroRankUpConfig.getLimitStar(),scHeroRankUpConfig);
|
||||
if(!result.get(type).containsKey(scHeroRankUpConfig.getStar())){
|
||||
result.get(type).put(scHeroRankUpConfig.getStar(),new HashMap<>());
|
||||
}
|
||||
if(type == GlobalsDef.UP_STAR_TYPE){
|
||||
result.get(type).get(scHeroRankUpConfig.getStar()).put(scHeroRankUpConfig.getLimitStar(),scHeroRankUpConfig);
|
||||
}
|
||||
result.get(type).get(scHeroRankUpConfig.getStar()).put(scHeroRankUpConfig.getLimitLevel(),scHeroRankUpConfig);
|
||||
}
|
||||
scHeroRankUpConfigByType = result;
|
||||
scHeroRankUpConfigByStar = result;
|
||||
}
|
||||
|
||||
public static Map<Integer, SCHeroRankUpConfig> getScHeroRankUpConfigByType(int type) {
|
||||
return scHeroRankUpConfigByType.get(type);
|
||||
public static Map<Integer, SCHeroRankUpConfig> getScHeroRankUpConfigByType(int type,int heroInitStar) {
|
||||
return scHeroRankUpConfigByStar.get(type).get(heroInitStar);
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
|
@ -80,4 +85,8 @@ public class SCHeroRankUpConfig implements BaseConfig{
|
|||
public int[][] getConsumeMaterial() {
|
||||
return consumeMaterial;
|
||||
}
|
||||
|
||||
public int getStar() {
|
||||
return star;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,67 @@
|
|||
package com.ljsd.jieling.config;
|
||||
|
||||
import com.ljsd.jieling.logic.STableManager;
|
||||
import com.ljsd.jieling.logic.Table;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@Table(name ="DifferDemonsComonpentsConfig")
|
||||
public class SDifferDemonsComonpentsConfig implements BaseConfig {
|
||||
|
||||
private int id;
|
||||
|
||||
private int comonpentsId;
|
||||
|
||||
private int stage;
|
||||
|
||||
private int[][] cost;
|
||||
|
||||
private int[][] baseAttribute;
|
||||
|
||||
private static Map<Integer,Map<Integer,SDifferDemonsComonpentsConfig>> sDifferDemonsComonpentsConfig;
|
||||
|
||||
|
||||
@Override
|
||||
public void init() throws Exception {
|
||||
Map<Integer,Map<Integer,SDifferDemonsComonpentsConfig>> sDifferDemonsComonpentsConfigTmp = new HashMap<>();
|
||||
Map<Integer, SDifferDemonsComonpentsConfig> config = STableManager.getConfig(SDifferDemonsComonpentsConfig.class);
|
||||
for(SDifferDemonsComonpentsConfig sDifferDemonsComonpentsConfig : config.values()){
|
||||
int comonpentsId = sDifferDemonsComonpentsConfig.getComonpentsId();
|
||||
int stage = sDifferDemonsComonpentsConfig.getStage();
|
||||
|
||||
if(!sDifferDemonsComonpentsConfigTmp.containsKey(comonpentsId)){
|
||||
sDifferDemonsComonpentsConfigTmp.put(comonpentsId,new HashMap<>());
|
||||
}
|
||||
sDifferDemonsComonpentsConfigTmp.get(comonpentsId).put(stage,sDifferDemonsComonpentsConfig);
|
||||
}
|
||||
sDifferDemonsComonpentsConfig = sDifferDemonsComonpentsConfigTmp;
|
||||
|
||||
}
|
||||
|
||||
public static Map<Integer,SDifferDemonsComonpentsConfig> getsDifferDemonsComonpentsConfigMap(int comonpentId) {
|
||||
return sDifferDemonsComonpentsConfig.get(comonpentId);
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public int getComonpentsId() {
|
||||
return comonpentsId;
|
||||
}
|
||||
|
||||
public int getStage() {
|
||||
return stage;
|
||||
}
|
||||
|
||||
public int[][] getCost() {
|
||||
return cost;
|
||||
}
|
||||
|
||||
public int[][] getBaseAttribute() {
|
||||
return baseAttribute;
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
package com.ljsd.jieling.config;
|
||||
|
||||
import com.ljsd.jieling.logic.STableManager;
|
||||
import com.ljsd.jieling.logic.Table;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@Table(name ="DifferDemonsConfig")
|
||||
public class SDifferDemonsConfig implements BaseConfig {
|
||||
|
||||
private int id;
|
||||
|
||||
private int[][] openRules;
|
||||
|
||||
private int[] comonpentList;
|
||||
|
||||
private static Map<Integer,SDifferDemonsConfig> sDifferDemonsConfigMap;
|
||||
|
||||
|
||||
@Override
|
||||
public void init() throws Exception {
|
||||
sDifferDemonsConfigMap= STableManager.getConfig(SDifferDemonsConfig.class);
|
||||
}
|
||||
|
||||
public static SDifferDemonsConfig getsDifferDemonsConfigByPokenID(int pokenmonId) {
|
||||
return sDifferDemonsConfigMap.get(pokenmonId);
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public int[][] getOpenRules() {
|
||||
return openRules;
|
||||
}
|
||||
|
||||
public int[] getComonpentList() {
|
||||
return comonpentList;
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,63 @@
|
|||
package com.ljsd.jieling.config;
|
||||
|
||||
import com.ljsd.jieling.logic.STableManager;
|
||||
import com.ljsd.jieling.logic.Table;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@Table(name ="DifferDemonsStageConfig")
|
||||
public class SDifferDemonsStageConfig implements BaseConfig {
|
||||
|
||||
private int id;
|
||||
|
||||
private int differDemonsId;
|
||||
|
||||
private int skillId;
|
||||
|
||||
private int[][] cost;
|
||||
|
||||
private int comonpentPreStage;
|
||||
|
||||
private static Map<Integer,Map<Integer,SDifferDemonsStageConfig>> sDifferDemonsStageConfigMap;
|
||||
|
||||
|
||||
@Override
|
||||
public void init() throws Exception {
|
||||
Map<Integer,Map<Integer,SDifferDemonsStageConfig>> sDifferDemonsStageConfigMapTmp = new HashMap<>();
|
||||
Map<Integer, SDifferDemonsStageConfig> config = STableManager.getConfig(SDifferDemonsStageConfig.class);
|
||||
for(SDifferDemonsStageConfig sDifferDemonsStageConfig : config.values()){
|
||||
int comonpentPreStage = sDifferDemonsStageConfig.getComonpentPreStage();
|
||||
int differDemonsId = sDifferDemonsStageConfig.getDifferDemonsId();
|
||||
if(!sDifferDemonsStageConfigMapTmp.containsKey(differDemonsId)){
|
||||
sDifferDemonsStageConfigMapTmp.put(differDemonsId,new HashMap<>());
|
||||
}
|
||||
sDifferDemonsStageConfigMapTmp.get(differDemonsId).put(comonpentPreStage,sDifferDemonsStageConfig);
|
||||
}
|
||||
sDifferDemonsStageConfigMap = sDifferDemonsStageConfigMapTmp;
|
||||
}
|
||||
|
||||
public static Map<Integer, SDifferDemonsStageConfig> getsDifferDemonsStageConfigMap(int pokenmonId) {
|
||||
return sDifferDemonsStageConfigMap.get(pokenmonId);
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public int getDifferDemonsId() {
|
||||
return differDemonsId;
|
||||
}
|
||||
|
||||
public int getSkillId() {
|
||||
return skillId;
|
||||
}
|
||||
|
||||
public int[][] getCost() {
|
||||
return cost;
|
||||
}
|
||||
|
||||
public int getComonpentPreStage() {
|
||||
return comonpentPreStage;
|
||||
}
|
||||
}
|
|
@ -60,11 +60,14 @@ public class SGameSetting implements BaseConfig {
|
|||
return actionPowerRormula;
|
||||
}
|
||||
|
||||
public float calSpeed(float speed, int level){
|
||||
public float calSpeed(float speed, int breakTimes){
|
||||
if(breakTimes == 0){
|
||||
return 0;
|
||||
}
|
||||
float result = speed;
|
||||
int length = speedFormula.length;
|
||||
for(int i=0;i< speedFormula.length;i++){
|
||||
double pow = Math.pow(level, --length);
|
||||
double pow = Math.pow(breakTimes, --length);
|
||||
result += speedFormula[i]*pow;
|
||||
}
|
||||
return result;
|
||||
|
|
|
@ -16,6 +16,8 @@ public class SHeroLevlConfig implements BaseConfig{
|
|||
|
||||
private float characterLevelPara;
|
||||
|
||||
private float speedLevelPara;
|
||||
|
||||
private int[][] consume;
|
||||
|
||||
|
||||
|
@ -49,4 +51,8 @@ public class SHeroLevlConfig implements BaseConfig{
|
|||
public int[][] getConsume() {
|
||||
return consume;
|
||||
}
|
||||
|
||||
public float getSpeedLevelPara() {
|
||||
return speedLevelPara;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@ package com.ljsd.jieling.config;
|
|||
import com.ljsd.jieling.logic.STableManager;
|
||||
import com.ljsd.jieling.logic.Table;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@Table(name ="PropertyConfig")
|
||||
|
@ -12,18 +13,31 @@ public class SPropertyConfig implements BaseConfig {
|
|||
|
||||
private int propertyId;
|
||||
|
||||
private String name;
|
||||
private int style;
|
||||
|
||||
private String info;
|
||||
private float score;
|
||||
|
||||
|
||||
private static Map<Integer,SPropertyConfig> sPropertyConfigByPIDMap;
|
||||
|
||||
|
||||
@Override
|
||||
public void init() throws Exception {
|
||||
|
||||
Map<Integer,SPropertyConfig> sPropertyConfigByPIDMapTmp = new HashMap<>();
|
||||
Map<Integer, SPropertyConfig> config = STableManager.getConfig(SPropertyConfig.class);
|
||||
for(SPropertyConfig sPropertyConfig : config.values()){
|
||||
int propertyId = sPropertyConfig.getPropertyId();
|
||||
sPropertyConfigByPIDMapTmp.put(propertyId,sPropertyConfig);
|
||||
}
|
||||
sPropertyConfigByPIDMapTmp = sPropertyConfigByPIDMap;
|
||||
|
||||
}
|
||||
|
||||
public static SPropertyConfig getsPropertyConfigByPID(int propertyId) {
|
||||
return sPropertyConfigByPIDMap.get(propertyId);
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
|
@ -31,13 +45,11 @@ public class SPropertyConfig implements BaseConfig {
|
|||
return propertyId;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
public int getStyle() {
|
||||
return style;
|
||||
}
|
||||
|
||||
public String getInfo() {
|
||||
return info;
|
||||
public float getScore() {
|
||||
return score;
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -13,4 +13,8 @@ public interface GlobalsDef {
|
|||
int MAGIC_DEFENCE_TYPE =4;
|
||||
int SPEED_TYPE =5;
|
||||
|
||||
//
|
||||
int RANKUP_PARA_TYPE =1;
|
||||
int BREAK_PARA_TYPE =2;
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,49 @@
|
|||
package com.ljsd.jieling.logic.dao;
|
||||
|
||||
import com.ljsd.common.mogodb.MongoBase;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class Pokemon extends MongoBase {
|
||||
|
||||
private int id;
|
||||
|
||||
private Map<Integer,Integer> comonpentsLevelMap; // 组件进阶信息
|
||||
|
||||
private int allStage;
|
||||
|
||||
public Pokemon(){}
|
||||
|
||||
public Pokemon(int id){
|
||||
this.id = id;
|
||||
this.comonpentsLevelMap = new HashMap<>();
|
||||
}
|
||||
|
||||
public void upComonpentLevel(int comonpentId) throws Exception {
|
||||
int level =1;
|
||||
Integer integer = this.comonpentsLevelMap.get(comonpentId);
|
||||
if( integer != null){
|
||||
level = integer+1 ;
|
||||
}
|
||||
updateString("comonpentsLevelMap."+comonpentId,level);
|
||||
this.comonpentsLevelMap.put(comonpentId,level);
|
||||
}
|
||||
|
||||
public int getAllStage() {
|
||||
return allStage;
|
||||
}
|
||||
|
||||
public void setAllStage(int allStage) throws Exception {
|
||||
updateString("allStage."+allStage,allStage);
|
||||
this.allStage = allStage;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public Map<Integer, Integer> getComonpentsLevelMap() {
|
||||
return comonpentsLevelMap;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
package com.ljsd.jieling.logic.dao;
|
||||
|
||||
import com.ljsd.common.mogodb.MongoBase;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public class PokemonManager extends MongoBase {
|
||||
private Map<Integer,Pokemon> pokemonMap;
|
||||
|
||||
|
||||
public void addPokemon(Pokemon pokemon) throws Exception {
|
||||
updateString("pokemonMap." + pokemon.getId(),pokemon);
|
||||
pokemonMap.put(pokemon.getId(),pokemon);
|
||||
}
|
||||
|
||||
|
||||
public Map<Integer, Pokemon> getPokemonMap() {
|
||||
return pokemonMap;
|
||||
}
|
||||
}
|
|
@ -23,6 +23,8 @@ public class User extends MongoRoot {
|
|||
|
||||
private AdventureManager adventureManager;
|
||||
|
||||
private PokemonManager pokemonManager;
|
||||
|
||||
|
||||
|
||||
public User(int uid, PlayerManager playerManager, ItemManager itemManager,
|
||||
|
@ -37,6 +39,7 @@ public class User extends MongoRoot {
|
|||
this.mailManager = new MailManager();
|
||||
this.equipManager = new EquipManager();
|
||||
this.adventureManager = new AdventureManager();
|
||||
this.pokemonManager = new PokemonManager();
|
||||
|
||||
//綁定关系
|
||||
this.playerManager.init(this, "playerManager", false);
|
||||
|
@ -47,6 +50,7 @@ public class User extends MongoRoot {
|
|||
this.mailManager.init(this,"mailManager",false);
|
||||
this.equipManager.init(this,"equipManager",false);
|
||||
this.adventureManager.init(this,"adventureManager",false);
|
||||
this.pokemonManager.init(this,"pokemonManager",false);
|
||||
}
|
||||
|
||||
public User(){
|
||||
|
@ -57,6 +61,7 @@ public class User extends MongoRoot {
|
|||
this.mapManager = new MapManager();
|
||||
this.equipManager = new EquipManager();
|
||||
this.adventureManager = new AdventureManager();
|
||||
this.pokemonManager = new PokemonManager();
|
||||
//綁定关系
|
||||
playerManager.init(this, "playerManager", false);
|
||||
itemManager.init(this, "itemManager", false);
|
||||
|
@ -64,6 +69,7 @@ public class User extends MongoRoot {
|
|||
mapManager.init(this, "mapManager", false);
|
||||
equipManager.init(this,"equipManager",false);
|
||||
adventureManager.init(this,"adventureManager",false);
|
||||
adventureManager.init(this,"pokemonManager",false);
|
||||
}
|
||||
|
||||
public static void init(LjsdMongoTemplate ljsdMongoTemplate) {
|
||||
|
@ -134,4 +140,8 @@ public class User extends MongoRoot {
|
|||
public AdventureManager getAdventureManager() {
|
||||
return adventureManager;
|
||||
}
|
||||
|
||||
public PokemonManager getPokemonManager() {
|
||||
return pokemonManager;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -125,7 +125,7 @@ public class CombatLogic {
|
|||
cacheHeroTid.add(templateId);
|
||||
myRecommendHeroSize++;
|
||||
}
|
||||
totalForce += HeroLogic.getInstance().calHeoForce(hero);
|
||||
totalForce += HeroLogic.getInstance().calHeoForce(user,hero);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -215,10 +215,11 @@ public class HeroLogic {
|
|||
MessageUtil.sendErrorResponse(session,0,MessageTypeProto.MessageType.UP_HERO_LEVEL_RESPONSE_VALUE,"");
|
||||
return;
|
||||
}
|
||||
SCHero scHero = SCHero.getsCHero().get(hero.getTemplateId());
|
||||
|
||||
int oldLevel = hero.getLevel();
|
||||
//判断需要进行升级还是进行突破
|
||||
Map<Integer, SCHeroRankUpConfig> scHeroRankUpConfigByType = SCHeroRankUpConfig.getScHeroRankUpConfigByType(GlobalsDef.BREAK_TYPE);
|
||||
Map<Integer, SCHeroRankUpConfig> scHeroRankUpConfigByType = SCHeroRankUpConfig.getScHeroRankUpConfigByType(GlobalsDef.BREAK_TYPE,scHero.getStar());
|
||||
SCHeroRankUpConfig scHeroRankUpConfig = scHeroRankUpConfigByType.get(oldLevel);
|
||||
boolean isBreak =false;
|
||||
int[][] consume;
|
||||
|
@ -268,9 +269,15 @@ public class HeroLogic {
|
|||
MessageUtil.sendErrorResponse(session,0,MessageTypeProto.MessageType.UP_HERO_STAR_RESPONSE_VALUE,"");
|
||||
return;
|
||||
}
|
||||
int oldStar = targetHero.getStar();
|
||||
|
||||
int oldStar = targetHero.getStar();
|
||||
SCHero scHero = SCHero.getsCHero().get(targetHero.getTemplateId());
|
||||
Map<Integer, SCHeroRankUpConfig> scHeroRankUpConfigByType = SCHeroRankUpConfig.getScHeroRankUpConfigByType(GlobalsDef.UP_STAR_TYPE,scHero.getStar());
|
||||
SCHeroRankUpConfig scHeroRankUpConfig = scHeroRankUpConfigByType.get(oldStar);
|
||||
if( targetHero.getLevel() < scHeroRankUpConfig.getLimitLevel()){
|
||||
MessageUtil.sendErrorResponse(session,0,MessageTypeProto.MessageType.UP_HERO_STAR_RESPONSE_VALUE,"等级不够");
|
||||
return;
|
||||
}
|
||||
Map<Integer,SCHero.ConsumeMaterialInfo> consumeMaterialInfoByPosition = scHero.getConsumeMaterialInfoOfPositionByStar(oldStar + 1);
|
||||
boolean canUse = true;
|
||||
List<String> removeHeroIds = new ArrayList<>();
|
||||
|
@ -324,11 +331,10 @@ public class HeroLogic {
|
|||
}
|
||||
|
||||
if(!canUse){
|
||||
MessageUtil.sendErrorResponse(session,0,MessageTypeProto.MessageType.UP_HERO_STAR_RESPONSE_VALUE,"");
|
||||
MessageUtil.sendErrorResponse(session,0,MessageTypeProto.MessageType.UP_HERO_STAR_RESPONSE_VALUE,"所选英雄不符合");
|
||||
return;
|
||||
}
|
||||
Map<Integer, SCHeroRankUpConfig> scHeroRankUpConfigByType = SCHeroRankUpConfig.getScHeroRankUpConfigByType(GlobalsDef.UP_STAR_TYPE);
|
||||
SCHeroRankUpConfig scHeroRankUpConfig = scHeroRankUpConfigByType.get(oldStar);
|
||||
|
||||
int[][] consumeMaterial = scHeroRankUpConfig.getConsumeMaterial();
|
||||
boolean enoughCost = ItemUtil.itemCost(user, consumeMaterial);
|
||||
if(!enoughCost){
|
||||
|
@ -354,24 +360,57 @@ public class HeroLogic {
|
|||
}
|
||||
|
||||
//初始属性*(1+化境增长)*等级系数 + 初始属性*突破系数
|
||||
public Map<Integer,Integer> calHeroAllAttribute(Hero hero){
|
||||
Map<Integer,Integer> result = new HashMap<>();
|
||||
int templateId = hero.getTemplateId();
|
||||
SCHero scHero = SCHero.getsCHero().get(templateId);
|
||||
SHeroLevlConfig sHeroLevlConfig = SHeroLevlConfig.getsCHero().get(hero.getLevel());
|
||||
float characterLevelPara = sHeroLevlConfig.getCharacterLevelPara();
|
||||
Map<Integer, Float> paraForHero = getParaForHero(hero);
|
||||
Map<Integer,Float> baseValueMap = new HashMap<>();
|
||||
baseValueMap.put(GlobalsDef.HP_TYPE,getBaseValueByType(scHero,GlobalsDef.HP_TYPE));
|
||||
baseValueMap.put(GlobalsDef.ATTACK_TYPE,getBaseValueByType(scHero,GlobalsDef.ATTACK_TYPE));
|
||||
baseValueMap.put(GlobalsDef.PHYSICAL_DEFENCE_TYPE,getBaseValueByType(scHero,GlobalsDef.PHYSICAL_DEFENCE_TYPE));
|
||||
baseValueMap.put(GlobalsDef.MAGIC_DEFENCE_TYPE,getBaseValueByType(scHero,GlobalsDef.MAGIC_DEFENCE_TYPE));
|
||||
baseValueMap.put(GlobalsDef.SPEED_TYPE,getBaseValueByType(scHero,GlobalsDef.SPEED_TYPE));
|
||||
for(Map.Entry<Integer,Float> item : baseValueMap.entrySet()){
|
||||
Integer attributeType = item.getKey();
|
||||
Float heroBaseValue = item.getValue();
|
||||
if(attributeType == GlobalsDef.SPEED_TYPE){
|
||||
result.put (attributeType,(int)(heroBaseValue * sHeroLevlConfig.getSpeedLevelPara() + SGameSetting.getGameSetting().calSpeed(heroBaseValue, hero.getBreakId())));
|
||||
}
|
||||
result.put(attributeType,(int)(heroBaseValue * ( 1 + paraForHero.get(GlobalsDef.RANKUP_PARA_TYPE)/10000.f) * characterLevelPara + heroBaseValue * paraForHero.get(GlobalsDef.BREAK_PARA_TYPE)/10000.f));
|
||||
}
|
||||
|
||||
public float calHeroAttribute(Hero hero,int type){
|
||||
return result;
|
||||
}
|
||||
public int calHeroAttribute(Hero hero,int type){
|
||||
//计算化境增长
|
||||
int templateId = hero.getTemplateId();
|
||||
SCHero scHero = SCHero.getsCHero().get(templateId);
|
||||
float baseValue = getBaseValueByType(scHero,type);
|
||||
SHeroLevlConfig sHeroLevlConfig = SHeroLevlConfig.getsCHero().get(hero.getLevel());
|
||||
float characterLevelPara = sHeroLevlConfig.getCharacterLevelPara();
|
||||
Map<Integer, Float> paraForHero = getParaForHero(hero);
|
||||
if(type == GlobalsDef.SPEED_TYPE){
|
||||
return (int)(baseValue * sHeroLevlConfig.getSpeedLevelPara() + SGameSetting.getGameSetting().calSpeed(baseValue, hero.getBreakId()));
|
||||
}
|
||||
return (int)(baseValue * ( 1 + paraForHero.get(GlobalsDef.RANKUP_PARA_TYPE)/10000.f) * characterLevelPara + baseValue * paraForHero.get(GlobalsDef.BREAK_PARA_TYPE)/10000.f);
|
||||
}
|
||||
|
||||
float characterLevelPara = SHeroLevlConfig.getsCHero().get(hero.getLevel()).getCharacterLevelPara();
|
||||
//计算化境增长
|
||||
Map<Integer, SCHeroRankUpConfig> scHeroRankUpConfigByTypeOfStar = SCHeroRankUpConfig.getScHeroRankUpConfigByType(GlobalsDef.UP_STAR_TYPE);
|
||||
private Map<Integer,Float> getParaForHero(Hero hero){
|
||||
Map<Integer,Float> result = new HashMap<>(2);
|
||||
SCHero scHero = SCHero.getsCHero().get(hero.getTemplateId());
|
||||
Map<Integer, SCHeroRankUpConfig> scHeroRankUpConfigByTypeOfStar = SCHeroRankUpConfig.getScHeroRankUpConfigByType(GlobalsDef.UP_STAR_TYPE,scHero.getStar());
|
||||
SCHeroRankUpConfig scHeroRankUpConfig = scHeroRankUpConfigByTypeOfStar.get(hero.getStar());
|
||||
float rankupPara =0.0f;
|
||||
if( scHeroRankUpConfig!=null ){
|
||||
rankupPara = scHeroRankUpConfig.getRankupPara();
|
||||
}
|
||||
//突破系数
|
||||
//突破系数
|
||||
float breakPara = 0.0f;
|
||||
int heroLevel = hero.getLevel();
|
||||
Map<Integer, SCHeroRankUpConfig> scHeroRankUpConfigByTypOfBreak = SCHeroRankUpConfig.getScHeroRankUpConfigByType(GlobalsDef.BREAK_TYPE);
|
||||
Map<Integer, SCHeroRankUpConfig> scHeroRankUpConfigByTypOfBreak = SCHeroRankUpConfig.getScHeroRankUpConfigByType(GlobalsDef.BREAK_TYPE,scHero.getStar());
|
||||
for( SCHeroRankUpConfig scHeroRankUpConfigTmp :scHeroRankUpConfigByTypOfBreak.values()){
|
||||
if( heroLevel >= scHeroRankUpConfigTmp.getLimitLevel() ){
|
||||
breakPara = scHeroRankUpConfigTmp.getRankupPara();
|
||||
|
@ -380,13 +419,9 @@ public class HeroLogic {
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(type == GlobalsDef.SPEED_TYPE){
|
||||
return SGameSetting.getGameSetting().calSpeed(baseValue,heroLevel);
|
||||
}
|
||||
|
||||
return baseValue * ( 1 + rankupPara/10000.f) + characterLevelPara * breakPara;
|
||||
|
||||
result.put(GlobalsDef.RANKUP_PARA_TYPE,rankupPara);
|
||||
result.put(GlobalsDef.BREAK_PARA_TYPE,breakPara);
|
||||
return result;
|
||||
}
|
||||
|
||||
private float getBaseValueByType(SCHero scHero,int type){
|
||||
|
@ -413,10 +448,17 @@ public class HeroLogic {
|
|||
}
|
||||
|
||||
|
||||
//todo 计算英雄战斗力 战斗力 = 生命*0.7 + (护甲 + 魔坑)*5 + 攻击 *10 + (暴击率 + 效果命中率 )*5 +(属性攻击率 + 属性防御率)*30
|
||||
public int calHeoForce(Hero hero){
|
||||
double heroBaseForce = calHeroAttribute(hero, GlobalsDef.HP_TYPE) * 0.7 + (calHeroAttribute(hero, GlobalsDef.PHYSICAL_DEFENCE_TYPE) + calHeroAttribute(hero, GlobalsDef.MAGIC_DEFENCE_TYPE)) * 5 + calHeroAttribute(hero, GlobalsDef.ATTACK_TYPE) * 10;
|
||||
//todo 计算英雄战斗力 战斗力 = 生命*0.7 + (护甲 + 魔坑)*5 + 攻击 *10 + (暴击率 + 效果命中率 + 效果抵抗率 )*5 +(属性攻击率 + 属性防御率)*30
|
||||
public int calHeoForce(User user, Hero hero){
|
||||
Map<Integer, Integer> heroAllAttribute = calHeroAllAttribute(hero);
|
||||
double heroBaseForce = heroAllAttribute.get(GlobalsDef.HP_TYPE) * 0.7 + (heroAllAttribute.get(GlobalsDef.PHYSICAL_DEFENCE_TYPE) + heroAllAttribute.get(GlobalsDef.MAGIC_DEFENCE_TYPE)) * 5 + heroAllAttribute.get(GlobalsDef.ATTACK_TYPE) * 10;
|
||||
//todo 计算装备加成
|
||||
Collection<String> values = hero.getEquipByPositionMap().values();
|
||||
EquipManager equipManager = user.getEquipManager();
|
||||
for(String equipId:values){
|
||||
Equip equip = equipManager.getEquipMap().get(equipId);
|
||||
|
||||
}
|
||||
float equipAddForce =0.0f;
|
||||
int result = (int) (heroBaseForce + equipAddForce);
|
||||
return result;
|
||||
|
@ -501,5 +543,90 @@ public class HeroLogic {
|
|||
.build();
|
||||
MessageUtil.sendMessage(iSession,1,msgId,heroComposeResponse,true); }
|
||||
|
||||
//异妖相关 组件放置升级
|
||||
public void pokenmonUpLevel(ISession session,int pokemonId,int comonpentId) throws Exception {
|
||||
int uid = session.getUid();
|
||||
User user = UserManager.getUser(uid);
|
||||
PokemonManager pokemonManager = user.getPokemonManager();
|
||||
Pokemon pokemon = pokemonManager.getPokemonMap().get(pokemonId);
|
||||
if(pokemon == null){
|
||||
return;
|
||||
}
|
||||
Integer oldLevel = pokemon.getComonpentsLevelMap().get(comonpentId);
|
||||
if (checkPokemonComonpent(pokemonId, comonpentId,oldLevel, user)){
|
||||
return;
|
||||
}
|
||||
pokemon.upComonpentLevel(comonpentId);
|
||||
|
||||
//发送成功消息
|
||||
|
||||
}
|
||||
|
||||
// 异妖进阶
|
||||
public void pokemonAdvanced(ISession session,int pokemonId) throws Exception {
|
||||
int uid = session.getUid();
|
||||
User user = UserManager.getUser(uid);
|
||||
PokemonManager pokemonManager = user.getPokemonManager();
|
||||
Pokemon pokemon = pokemonManager.getPokemonMap().get(pokemonId);
|
||||
if(pokemon == null){
|
||||
return;
|
||||
}
|
||||
SDifferDemonsConfig sDifferDemonsConfig = SDifferDemonsConfig.getsDifferDemonsConfigByPokenID(pokemonId);
|
||||
int[] comonpentList = sDifferDemonsConfig.getComonpentList();
|
||||
Map<Integer, Integer> comonpentsLevelMap = pokemon.getComonpentsLevelMap();
|
||||
Map<Integer, SDifferDemonsStageConfig> sDifferDemonsStageConfigMap = SDifferDemonsStageConfig.getsDifferDemonsStageConfigMap(pokemonId);
|
||||
SDifferDemonsStageConfig sDifferDemonsStageConfig = sDifferDemonsStageConfigMap.get(pokemon.getAllStage() + 1);
|
||||
int comonpentPreStage = sDifferDemonsStageConfig.getComonpentPreStage();
|
||||
|
||||
boolean isEnough = true;
|
||||
for(int i=0;i<comonpentList.length;i++){
|
||||
if(!comonpentsLevelMap.containsKey(comonpentList[i])){
|
||||
isEnough =false;
|
||||
break;
|
||||
}
|
||||
if(comonpentsLevelMap.get(comonpentList[i]) < comonpentPreStage){
|
||||
isEnough =false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!isEnough){
|
||||
return;
|
||||
}
|
||||
|
||||
pokemon.setAllStage(pokemon.getAllStage()+1);
|
||||
|
||||
//发送成功消息
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
private boolean checkPokemonComonpent(int pokemonId, int comonpentId, int oldLevel,User user) throws Exception {
|
||||
SDifferDemonsConfig sDifferDemonsConfig = SDifferDemonsConfig.getsDifferDemonsConfigByPokenID(pokemonId);
|
||||
int[] comonpentList = sDifferDemonsConfig.getComonpentList();
|
||||
boolean isHave = false;
|
||||
for(int i=0;i<comonpentList.length;i++){
|
||||
if( comonpentList[i] == comonpentId){
|
||||
isHave = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!isHave){
|
||||
return true;
|
||||
}
|
||||
|
||||
Map<Integer, SDifferDemonsComonpentsConfig> sDifferDemonsComonpentsConfigMap = SDifferDemonsComonpentsConfig.getsDifferDemonsComonpentsConfigMap(comonpentId);
|
||||
if(!sDifferDemonsComonpentsConfigMap.containsKey(oldLevel+1)){
|
||||
return true;
|
||||
}
|
||||
SDifferDemonsComonpentsConfig sDifferDemonsComonpentsConfig = sDifferDemonsComonpentsConfigMap.get(oldLevel + 1);
|
||||
int[][] cost = sDifferDemonsComonpentsConfig.getCost();
|
||||
boolean enoughCost = ItemUtil.itemCost(user, cost);
|
||||
if(!enoughCost){
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue