Spaces:
Runtime error
Runtime error
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
}
|