MoebiusMeow/WCLA
1
1# 处理战斗解析规则
2from langs import *
3
4print("正在加载语言文件")
5load_langs_files()
6print("加载完毕")
7
8cast_langs = ["casts", "施放", "施放"]
9summons_langs = ["Summons", "召唤", "召喚", "transformed into Super", "变身精英", "變身精英"]
10hp_langs = ["HP", "生命", "生命"]
11armor_langs = ["Armor", "护甲", "護甲"]
12health_steal_langs = ["Health Steal", "生命偷取", "生命偷取"]
13light_langs = ["Light", "光系", "光系"]
14neutral_langs = ["Neutral", "中性", "中性"]
15bomb_langs = ["Blinding Bomb", "Burning Bomb", "Paralyzing Bomb", "燃烧弹", "麻痹弹", "致盲弹", "燃燒彈", "麻痺彈", "致盲彈"]
16addedvalue_langs = ["Added Value", "增值", "增值"]
17
18direct_modifier = [ # 视为直接攻击 (上一个施法者使用)
19 "content.8.7779", # 箭塔
20 "content.8.7780",
21 "content.8.7781",
22 "content.13.352025", # 弹射
23 "content.13.352026",
24 "content.13.352027",
25 "content.13.346805",
26 "content.3.7794", # 歪曲
27 "content.13.357542", # Pulsar I II II
28 "content.13.357543",
29 "content.13.357544",
30 "content.13.326833", # Animal Devotion
31 "content.13.371205", # 回旋镖 (Dagger Return)
32 "content.13.359757", # 猫咪魔牌击攻击的四个结果 (Bad Luck, Chance, Slight Bad Luck, Slight Chance)
33 "content.13.359758", # (Slight Bad Luck)
34 "content.13.359759", # (Slight Chance)
35 "content.13.359760", # (Chance)
36 "content.13.382772", # (Yowling)
37 "content.13.371766", # (Propagator - Doctor without borders)
38 "content.13.368123", # (Propagator)
39 "content.13.371767", # (Vampiripsa)
40 "content.13.371774", # (Radiance)
41 "content.13.371791", # (Single Heal)
42 "content.13.353084", #(分配)
43 "content.13.371977", #(自我矛盾)
44]
45self_modifier = [ # 视为对自己使用
46 # 升华
47 "content.8.7853", # 血甲
48 "content.8.6831", # 息存
49 "content.8.6029", # 盾墙
50 "content.8.6927", # 预防
51 "content.8.6041", # 归心
52 "content.8.6822", # 奥秘
53 "content.13.315482", # Berserk Wakfu
54
55 "content.3.5454", # Puncture 奶妈荆棘
56
57 "content.3.5052", # Clinging to Life
58 "content.3.5053", # Blood Pact
59 "content.13.353264", # 栋梁 Pillar
60 "content.13.353415", # Wakfu Pact
61
62 "content.3.7960", # Blackjack
63
64 "content.3.6486", # Blade Master
65]
66delayed_modifier = [ # 是某个有名字的延迟效果 (默认)
67 # "content.8.3717", # 大家乐
68]
69burning_modifier = [ # 燃烧(回合开始时输出)
70 "content.13.151760" # 燃烧
71]
72counterattack_modifier = [ # 是反击效果(上个被打者造成伤害)
73 "content.13.315519" # (Counterattack)
74]
75ignore_modifier = [ # 需要忽略的效果
76 "content.13.114508", # (Vital Energy) 气功
77]
78
79pair_delayed_effect = [
80 # 是技能和效果名字不同的延迟效果
81 ("Heal-splosion",
82 "content.13.367422"), # (Sadist Mark)
83 ("Alternative Cure",
84 "content.13.167588"), # (Here Mark)
85 ("Guardian Fire",
86 "content.13.367441"), # (Traid Mark)
87 ("Corrosive Heal",
88 "content.13.167495"), # (Hammle Mark)
89 ("Purifying Flame",
90 "content.13.367474"), # (Refund Mark)
91 ("Infected Flask",
92 "content.13.313580"), # (Gangrene)
93
94 ("Volcano", "content.13.298772"), # (Volcano Shield)
95 ("Avalanche", "content.13.298804"), # (Avalanche Shield)
96 ("Crashing Wave", "content.13.298829"), # (Crashing Wave Shield)
97 ("Defensive Orb", "content.13.299507"), # (Defensive Orb Shield)
98 ("Meteorite", "content.13.305222"), # (Meteorite Shield)
99]
100
101breed_effect = [
102 # 只能用种族区分的效果(如被动)
103 (15, "content.13.382809"), #(地盘术)
104 (15, "content.13.241069"), #(地盘)
105 (15, "content.13.339727"), #(碎炎)
106 (15, "content.13.340100"), #(消化)
107 (15, "content.13.339683"), #(好斗)
108 (15, "content.13.341048"), #(巧劲)
109 (3, "content.13.384633"), #(宝藏猎人小袋子)
110 (3, "content.13.384654"), #(宝藏猎人大袋子)
111]
112
113pair_lookup = {}
114for (spell, effect) in pair_delayed_effect:
115 for effect_lang in localized_modifier([effect]):
116 pair_lookup.setdefault(effect_lang, set())
117 pair_lookup[effect_lang].add(spell)
118 pair_lookup[effect_lang].add(to_zh(spell))
119 pair_lookup[effect_lang].add(to_zhtw(spell))
120
121breed_lookup = {}
122for (breed, effect) in breed_effect:
123 for effect_lang in localized_modifier([effect]):
124 breed_lookup.setdefault(effect_lang, set())
125 breed_lookup[effect_lang].add(breed)
126
127direct_modifier_langs = localized_modifier(direct_modifier)
128self_modifier_langs = localized_modifier(self_modifier)
129delayed_modifier_langs = localized_modifier(delayed_modifier)
130burning_modifier_langs = localized_modifier(burning_modifier)
131counterattack_modifier_langs = localized_modifier(counterattack_modifier)
132ignore_modifier_langs = localized_modifier(ignore_modifier)
133
134self_modifier_langs.add("Neutral - Health Steal")
135self_modifier_langs.add("中性 - 生命偷取")
136
137known_modifier_langs = []
138known_modifier_langs.extend(direct_modifier_langs)
139known_modifier_langs.extend(self_modifier_langs)
140known_modifier_langs.extend(delayed_modifier)
141known_modifier_langs.extend(burning_modifier)
142known_modifier_langs.extend(counterattack_modifier)
143known_modifier_langs.extend(ignore_modifier)
144 