Skip to content

Commit

Permalink
rusty platemail
Browse files Browse the repository at this point in the history
  • Loading branch information
ennorehling committed Jan 18, 2024
1 parent 7b48283 commit 9bce6d0
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 8 deletions.
1 change: 1 addition & 0 deletions conf/e2/items.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"config://res/core/armor/laenshield.xml",
"config://res/core/armor/plate.xml",
"config://res/core/armor/rustychainmail.xml",
"config://res/core/armor/rustyplate.xml",
"config://res/core/armor/rustyshield.xml",
"config://res/core/armor/shield.xml",
"config://res/core/resources/cart.xml",
Expand Down
3 changes: 0 additions & 3 deletions res/core/armor/rustychainmail.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
<eressea><resources>
<resource name="rustychainmail">
<item weight="200" score="30">
<construction skill="armorer" minskill="3">
<requirement type="iron" quantity="3"/>
</construction>
<armor ac="2" penalty="0.30" magres="0.0"/>
</item>
</resource>
Expand Down
10 changes: 10 additions & 0 deletions res/core/armor/rustyplate.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0"?>
<eressea>
<resources>
<resource name="rustyplate">
<item weight="400" score="150" deny="cat">
<armor ac="3" penalty="0.45" magres="0.0"/>
</item>
</resource>
</resources>
</eressea>
3 changes: 0 additions & 3 deletions res/core/armor/rustyshield.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
<eressea><resources>
<resource name="rustyshield">
<item weight="100" score="10">
<construction skill="armorer" minskill="2">
<requirement type="iron" quantity="1"/>
</construction>
<armor ac="1" penalty="0.0" magres="0.0" shield="yes"/>
</item>
</resource>
Expand Down
6 changes: 6 additions & 0 deletions res/translations/strings.de.po
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ msgstr ""
msgid "rustychainmail"
msgstr "Rostiges Kettenhemd"

msgid "rustyplate"
msgstr "Rostiger Plattenpanzer"

msgid "rustyplate_p"
msgstr "Rostige Plattenpanzer"

msgctxt "spellinfo"
msgid "destroy_magic"
msgstr ""
Expand Down
10 changes: 8 additions & 2 deletions res/translations/strings.en.po
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,13 @@ msgstr ""
"X-Generator: Poedit 2.0.7\n"

msgid "rustychainmail"
msgstr "rustychainmail"
msgstr "rusty chainmail"

msgid "rustyplate"
msgstr "rusty platemail"

msgid "rustyplate_p"
msgstr "rusty platemails"

msgctxt "spellinfo"
msgid "destroy_magic"
Expand Down Expand Up @@ -2435,7 +2441,7 @@ msgid "magicherbbag"
msgstr "bag of conservation"

msgid "rustychainmail_p"
msgstr "rustychainmails"
msgstr "rusty chainmails"

msgctxt "spellpar"
msgid "direction"
Expand Down
6 changes: 6 additions & 0 deletions scripts/tests/e2/spells.lua
Original file line number Diff line number Diff line change
Expand Up @@ -427,16 +427,22 @@ function test_cast_rostregen()
u:set_skill("magic", 20)
u2:add_item("sword", 1)
u2:add_item("axe", 1)
u2:add_item("halberd", 2)
u2:add_item("shield", 2)
u2:add_item("chainmail", 5)
u2:add_item("plate", 5)
u:add_order('ZAUBERE STUFE 10 Rostregen ' .. itoa36(u2.id))
process_orders()
assert_equal(0, u2:get_item("sword"))
assert_equal(1, u2:get_item("rustysword"))
assert_equal(0, u2:get_item("axe"))
assert_equal(1, u2:get_item("rustyaxe"))
assert_equal(1, u2:get_item("halberd"))
assert_equal(1, u2:get_item("rustyhalberd"))
assert_equal(1, u2:get_item("shield"))
assert_equal(1, u2:get_item("rustyshield"))
assert_equal(4, u2:get_item("chainmail"))
assert_equal(1, u2:get_item("rustychainmail"))
assert_equal(4, u2:get_item("plate"))
assert_equal(1, u2:get_item("rustyplate"))
end
1 change: 1 addition & 0 deletions src/spells.c
Original file line number Diff line number Diff line change
Expand Up @@ -1323,6 +1323,7 @@ static struct iron_weapon {
{ 0.5f, {.name = "halberd" }, {.name = "rustyhalberd" } },
{ 0.5f, {.name = "shield" }, {.name = "rustyshield" } },
{ 0.2f, {.name = "chainmail"}, {.name = "rustychainmail" }},
{ 0.2f, {.name = "plate" }, {.name = "rustyplate" } },
{ 0.0f, {.name = NULL}, { .name = NULL} }
};

Expand Down

0 comments on commit 9bce6d0

Please sign in to comment.