File size: 9,147 Bytes
ef62e40
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0ed027c
ef62e40
 
 
 
 
 
 
 
0ed027c
ef62e40
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6d09f00
ef62e40
 
b76daae
ef62e40
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1467c05
ef62e40
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
36e359a
 
ef62e40
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
from base.attribute import Attribute
from base.gain import Gain


class FormationGain(Gain):
    gain_attributes: dict = {}
    core_gain_attributes: dict = {}
    rate_gain_attributes: dict = {}

    def __init__(self, rate=0, core_rate=0):
        super().__init__(type(self).__name__)
        self.rate = rate / 100
        self.core_rate = core_rate / 100

    def add_attribute(self, attribute: Attribute):
        for attr, value in self.gain_attributes.items():
            setattr(attribute, attr, getattr(attribute, attr) + value)
        for attr, value in self.core_gain_attributes.items():
            setattr(attribute, attr, getattr(attribute, attr) + int(value * self.core_rate))
        for attr, value in self.rate_gain_attributes.items():
            setattr(attribute, attr, getattr(attribute, attr) + int(value * self.rate))

    def sub_attribute(self, attribute: Attribute):
        for attr, value in self.gain_attributes.items():
            setattr(attribute, attr, getattr(attribute, attr) - value)
        for attr, value in self.core_gain_attributes.items():
            setattr(attribute, attr, getattr(attribute, attr) - int(value * self.core_rate))
        for attr, value in self.rate_gain_attributes.items():
            setattr(attribute, attr, getattr(attribute, attr) - int(value * self.rate))


class ä¹éŸ³ęƒŠå¼¦é˜µ(FormationGain):
    gain_attributes = {
        "magical_attack_power_gain": 50,
        "magical_critical_strike_gain": 300,
        "magical_critical_power_gain": 51,
    }
    core_gain_attributes = {"magical_overcome_gain": 307}
    rate_gain_attributes = {"magical_attack_power_gain": 50}


class äøƒē»é€é„阵(FormationGain):
    gain_attributes = {
        "magical_attack_power_gain": 51,
        "magical_overcome_gain": 300
    }


class å«å…¬ęŠ˜å†²é˜µ(FormationGain):
    gain_attributes = {
        "physical_attack_power_gain": 50,
        "physical_overcome_gain": 200
    }
    core_gain_attributes = {"strength_gain": 10 * 5}
    rate_gain_attributes = {"physical_attack_power_gain": 51}


class 天鼓雷音阵(FormationGain):
    gain_attributes = {
        "magical_attack_power_gain": 51,
        "strain_gain": 20,
        "magical_overcome_gain": 102
    }
    rate_gain_attributes = {"magical_attack_power_gain": 21 * 5}


class åŒ—ę–—äøƒę˜Ÿé˜µ(FormationGain):
    gain_attributes = {
        "physical_critical_strike_gain": 300,
        "strain_gain": 20,
        "physical_critical_power_gain": 150
    }
    rate_gain_attributes = {"physical_critical_strike_gain": 100 * 5}


class 九宫八卦阵(FormationGain):
    gain_attributes = {
        "magical_critical_strike_gain": 300,
        "strain_gain": 20,
        "magical_critical_power_gain": 154
    }
    rate_gain_attributes = {"magical_critical_strike_gain": 100 * 5}


class ä¾å±±č§‚ę¾œé˜µ(FormationGain):
    gain_attributes = {
        "agility_gain": 30,
        "physical_attack_power_gain": 51,
        "physical_critical_power_gain": 204
    }


class äø‡č›Šå™¬åæƒé˜µ(FormationGain):
    gain_attributes = {
        "magical_attack_power_gain": 51,
        "magical_critical_strike_gain": 300,
        "magical_critical_power_gain": 102
    }
    core_gain_attributes = {"magical_attack_power_gain": 51}
    rate_gain_attributes = {"magical_overcome_gain": 102}


class ęµę˜Ÿčµ¶ęœˆé˜µ(FormationGain):
    gain_attributes = {
        "strength_gain": 30,
        "strain_gain": 20,
        "physical_overcome_gain": 205
    }
    rate_gain_attributes = {"physical_critical_strike_gain": 500}


class 千ęœŗē™¾å˜é˜µ(FormationGain):
    gain_attributes = {
        "magical_attack_power_gain": 51,
        "all_shield_ignore": 52,
        "all_critical_power_gain": 150
    }
    rate_gain_attributes = {"all_critical_strike_gain": 500}


class ē‚Žå؁ē “魔阵(FormationGain):
    gain_attributes = {
        "magical_attack_power_gain": 51,
        "magical_critical_strike_gain": 300,
    }
    core_gain_attributes = {"magical_critical_power_gain": 200}
    rate_gain_attributes = {"magical_critical_strike_gain": 1000}


class é™é¾™ä¼č™Žé˜µ(FormationGain):
    gain_attributes = {
        "physical_attack_power_gain": 50,
        "physical_overcome_gain": 102
    }
    core_gain_attributes = {"physical_overcome_gain": 306}
    rate_gain_attributes = {"physical_overcome_base": 770 * 5}


class 锋凌ęØŖē»é˜µ(FormationGain):
    gain_attributes = {
        "physical_critical_strike_gain": 300,
        "strain_gain": 20,
    }
    core_gain_attributes = {"physical_overcome_gain": 153}
    rate_gain_attributes = {"physical_critical_power_gain": 20 * 5}


class äø‡ē±é‡‘弦阵(FormationGain):
    gain_attributes = {
        "magical_critical_strike_gain": 300,
        "strain_gain": 20,
        "magical_attack_power_gain": 102
    }
    core_gain_attributes = {"magical_critical_power_gain": 205}
    rate_gain_attributes = {"magical_critical_strike_gain": 500}


class éœœå²šę“—é”‹é˜µ(FormationGain):
    gain_attributes = {
        "physical_attack_power_gain": 50,
        "strain_gain": 20,
        "physical_overcome_gain": 102,
    }
    rate_gain_attributes = {"all_critical_strike_gain": 500}


class å¢Ÿęµ·å¼•å½’é˜µ(FormationGain):
    gain_attributes = {
        "physical_critical_strike_gain": 300,
        "physical_attack_power_gain": 133,
        "physical_overcome_gain": 102
    }
    core_gain_attributes = {"physical_attack_power_gain": 51}


class 龙ēš‡é›Ŗ风阵(FormationGain):
    gain_attributes = {
        "physical_critical_strike_gain": 300,
        "physical_attack_power_gain": 50,
        "physical_critical_power_gain": 154,
    }
    core_gain_attributes = {"physical_critical_power_gain": 100}
    rate_gain_attributes = {"physical_attack_power_gain": 102}


class ä¹ę˜Ÿęøø幓阵(FormationGain):
    values = [102, 92, 82, 71, 61, 51, 41, 31, 20, 10]
    gain_attributes = {
        "magical_attack_power_gain": 51,
        "strain_gain": 20,
        "magical_critical_power_gain": 100
    }
    core_gain_attributes = {"magical_critical_power_gain": sum(values) / len(values)}
    rate_gain_attributes = {"all_damage_addition": int(154 / 2)}


class ä¹±ęš®ęµŠčŒµé˜µ(FormationGain):
    gain_attributes = {
        "magical_attack_power_gain": 51,
        "all_damage_addition": 31,
        "all_critical_strike_gain": 300
    }


class ęØŖäŗ‘ē “锋阵(FormationGain):
    gain_attributes = {
        "physical_attack_power_gain": 50,
        "surplus_base": 1516,
        "physical_overcome_gain": 256
    }
    core_gain_attributes = {"physical_critical_power_gain": 100}


class č‹ę¢§å¼•ēµé˜µ(FormationGain):
    gain_attributes = {
        "all_critical_strike_gain": 300,
        "strain_gain": 20,
        "all_damage_addition": 62,
    }
    rate_gain_attributes = {"all_critical_power_gain": 150}


FORMATIONS = {
    "": ["千ęœŗē™¾å˜é˜µ", "č‹ę¢§å¼•ēµé˜µ"],
    "外功": [
        "å«å…¬ęŠ˜å†²é˜µ", "åŒ—ę–—äøƒę˜Ÿé˜µ", "ä¾å±±č§‚ę¾œé˜µ", "ęµę˜Ÿčµ¶ęœˆé˜µ", "é™é¾™ä¼č™Žé˜µ", "锋凌ęØŖē»é˜µ", "éœœå²šę“—é”‹é˜µ", "å¢Ÿęµ·å¼•å½’é˜µ",
        "龙ēš‡é›Ŗ风阵", "ęØŖäŗ‘ē “锋阵"
    ],
    "内功": [
        "ä¹éŸ³ęƒŠå¼¦é˜µ", "äøƒē»é€é„阵", "天鼓雷音阵", "九宫八卦阵", "äø‡č›Šå™¬åæƒé˜µ", "ē‚Žå؁ē “魔阵", "äø‡ē±é‡‘弦阵", "ä¹ę˜Ÿęøø幓阵",
        "ä¹±ęš®ęµŠčŒµé˜µ"
    ]
}
# FORMATION_GAIN_NAMES = {
#     "ä¹éŸ³ęƒŠå¼¦é˜µ": "ä¹éŸ³ęƒŠå¼¦é˜µ(5%å†…ę”»3%内会5%å†…åŠŸä¼šę•ˆ/5%å†…ę”»)",
#     "äøƒē»é€é„阵": "äøƒē»é€é„阵(5%å†…ę”»30%内ē “)",
#     "å«å…¬ęŠ˜å†²é˜µ": "å«å…¬ęŠ˜å†²é˜µ(5%å¤–ę”»20%外ē “/5%å¤–ę”»)",
#     "天鼓雷音阵": "天鼓雷音阵(5%å†…ę”»2%ę— åŒ10%内ē “/5*2%å†…ę”»)",
#     "åŒ—ę–—äøƒę˜Ÿé˜µ": "åŒ—ę–—äøƒę˜Ÿé˜µ(3%外会2%ę— åŒ15%å¤–åŠŸä¼šę•ˆ/5*1%外会)",
#     "九宫八卦阵": "九宫八卦阵(3%内会2%ę— åŒ15%å†…åŠŸä¼šę•ˆ/5*1%内会)",
#     "ä¾å±±č§‚ę¾œé˜µ": "ä¾å±±č§‚ę¾œé˜µ(3%čŗ«ę³•5%å¤–ę”»20%å¤–ę”»ä¼šę•ˆ)",
#     "äø‡č›Šå™¬åæƒé˜µ": "äø‡č›Šå™¬åæƒé˜µ(5%å†…ę”»3%内会10%å†…åŠŸä¼šę•ˆ/10%内ē “)",
#     "ęµę˜Ÿčµ¶ęœˆé˜µ": "ęµę˜Ÿčµ¶ęœˆé˜µ(3%力道2%ę— åŒ20%外ē “/5%外会)",
#     "千ęœŗē™¾å˜é˜µ": "千ęœŗē™¾å˜é˜µ(5%å†…ę”»5%ꗠ视15%ä¼šę•ˆ/5%会åæƒ)",
#     "ē‚Žå؁ē “魔阵": "ē‚Žå؁ē “魔阵(5%å†…ę”»3%内会/10%内会)",
#     "é™é¾™ä¼č™Žé˜µ": "é™é¾™ä¼č™Žé˜µ(5%å¤–ę”»10%外ē “/5*770外ē “)",
#     "锋凌ęØŖē»é˜µ": "锋凌ęØŖē»é˜µ(3%外会2%ę— åŒ/5*2%å¤–åŠŸä¼šę•ˆ)",
#     "äø‡ē±é‡‘弦阵": "äø‡ē±é‡‘弦阵(3%内会2%ę— åŒ10%å†…ę”»/5*1%内会",
#     "éœœå²šę“—é”‹é˜µ": "éœœå²šę“—é”‹é˜µ(5%å¤–ę”»2%ę— åŒ10%外ē “/5%会åæƒ)",
#     "å¢Ÿęµ·å¼•å½’é˜µ": "å¢Ÿęµ·å¼•å½’é˜µ(3%外会10%å¤–ę”»10%外ē “)",
#     "龙ēš‡é›Ŗ风阵": "龙ēš‡é›Ŗ风阵(3%外会5%å¤–ę”»15%å¤–åŠŸä¼šę•ˆ/10%å¤–ę”»)",
#     "ä¹ę˜Ÿęøø幓阵": "ä¹ę˜Ÿęøø幓阵(5%å†…ę”»2%ę— åŒ10%å†…åŠŸä¼šę•ˆ/15%伤害增加)",
#     "ä¹±ęš®ęµŠčŒµé˜µ": "ä¹±ęš®ęµŠčŒµé˜µ(5%å†…ę”»3%伤害增加3%会åæƒ)",
#     "ęØŖäŗ‘ē “锋阵": "ęØŖäŗ‘ē “锋阵(5%å¤–ę”»1516ē “ꋛ25%外ē “)",
#     "č‹ę¢§å¼•ēµé˜µ": "č‹ę¢§å¼•ēµé˜µ(3%会åæƒ2%ę— åŒ6%伤害增加/15%ä¼šę•ˆ)",
# }

FORMATION_GAINS = {
    formation: globals()[formation]
    for formations in FORMATIONS.values() for formation in formations
}