Skip to content

Commit 479fed1

Browse files
authored
Upgrade project files
1 parent 4a58f3d commit 479fed1

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

coilsnake/modules/eb/EnemyModule.py

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ def read_from_project(self, resource_open):
234234
def upgrade_project(self, old_version, new_version, rom, resource_open_r, resource_open_w, resource_delete):
235235
if old_version == new_version:
236236
return
237-
elif old_version == 3:
237+
elif old_version <= 13:
238238
replace_field_in_yml(resource_name="enemy_configuration_table",
239239
resource_open_r=resource_open_r,
240240
resource_open_w=resource_open_w,
@@ -265,7 +265,25 @@ def upgrade_project(self, old_version, new_version, rom, resource_open_r, resour
265265
4: "16/128",
266266
5: "32/128",
267267
6: "64/128",
268-
7: "128/128"})
268+
7: "128/128"}),
269+
replace_field_in_yml(resource_name="enemy_configuration_table",
270+
resource_open_r=resource_open_r,
271+
resource_open_w=resource_open_w,
272+
key="Flash vulnerability",
273+
value_map={"100%": "99%",
274+
"70%": "50%",
275+
"40%": "10%",
276+
"5%": "0%"}),
277+
replace_field_in_yml(resource_name="enemy_configuration_table",
278+
resource_open_r=resource_open_r,
279+
resource_open_w=resource_open_w,
280+
key="Hypnosis/Brainshock vulnerability",
281+
value_map={"100%": "99%"}),
282+
replace_field_in_yml(resource_name="enemy_configuration_table",
283+
resource_open_r=resource_open_r,
284+
resource_open_w=resource_open_w,
285+
key="Paralysis vulnerability",
286+
value_map={"100%": "99%"})
269287
self.upgrade_project(
270288
old_version + 1, new_version, rom, resource_open_r, resource_open_w, resource_delete)
271289
else:

0 commit comments

Comments
 (0)