forked from github/server
New armor type (needs strings, etc) for E3
This commit is contained in:
parent
be015da263
commit
eb1f5a41d1
4 changed files with 18 additions and 5 deletions
|
@ -966,6 +966,7 @@ plan_monsters(void)
|
||||||
}
|
}
|
||||||
if (skill_enabled[SK_PERCEPTION]) {
|
if (skill_enabled[SK_PERCEPTION]) {
|
||||||
/* Monster bekommen jede Runde ein paar Tage Wahrnehmung dazu */
|
/* Monster bekommen jede Runde ein paar Tage Wahrnehmung dazu */
|
||||||
|
/* TODO: this only works for playerrace */
|
||||||
produceexp(u, SK_PERCEPTION, u->number);
|
produceexp(u, SK_PERCEPTION, u->number);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
11
src/res/armor/scale.xml
Normal file
11
src/res/armor/scale.xml
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<resource name="scale">
|
||||||
|
<item weight="400" score="150">
|
||||||
|
<function name="canuse" value="lua_canuse_item"/>
|
||||||
|
<construction skill="armorer" minskill="4" reqsize="1">
|
||||||
|
<modifier function="mod_dwarves_only"/>
|
||||||
|
<requirement type="iron" quantity="2"/>
|
||||||
|
</construction>
|
||||||
|
<armor ac="3" penalty="0.15" projectile="0.10" magres="0.0"/>
|
||||||
|
</item>
|
||||||
|
</resource>
|
|
@ -7,5 +7,6 @@
|
||||||
<xi:include href="../armor/rustychainmail-2.xml"/>
|
<xi:include href="../armor/rustychainmail-2.xml"/>
|
||||||
<xi:include href="../armor/rustyshield-2.xml"/>
|
<xi:include href="../armor/rustyshield-2.xml"/>
|
||||||
<xi:include href="../armor/shield-2.xml"/>
|
<xi:include href="../armor/shield-2.xml"/>
|
||||||
|
<xi:include href="../armor/scale.xml"/>
|
||||||
<xi:include href="../armor/towershield.xml"/>
|
<xi:include href="../armor/towershield.xml"/>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
-- when appending to this, make sure the item has a canuse-function!
|
-- when appending to this, make sure the item has a canuse-function!
|
||||||
local goblin_denied = " plate lance mallornlance greatbow axe greatsword halberd rustyaxe rustyhalberd towershield "
|
local goblin_denied = " plate lance mallornlance greatbow axe greatsword halberd rustyaxe rustyhalberd towershield scale "
|
||||||
function item_canuse(u, iname)
|
function item_canuse(u, iname)
|
||||||
local race = u.race
|
local race = u.race
|
||||||
if race=="goblin" then
|
if race=="goblin" then
|
||||||
|
@ -11,6 +11,10 @@ function item_canuse(u, iname)
|
||||||
-- only dwarves and halflings allowed to use towershield
|
-- only dwarves and halflings allowed to use towershield
|
||||||
return race=="dwarf" or race=="halfling"
|
return race=="dwarf" or race=="halfling"
|
||||||
end
|
end
|
||||||
|
if iname=="scale" then
|
||||||
|
-- only dwarves and halflings can use scale
|
||||||
|
return race=="dwarf" or race=="halfling"
|
||||||
|
end
|
||||||
if iname=="towershield" then
|
if iname=="towershield" then
|
||||||
-- only dwarves allowed to use towershield
|
-- only dwarves allowed to use towershield
|
||||||
return race=="dwarf"
|
return race=="dwarf"
|
||||||
|
@ -19,10 +23,6 @@ function item_canuse(u, iname)
|
||||||
-- only elves use greatbow
|
-- only elves use greatbow
|
||||||
return race=="elf"
|
return race=="elf"
|
||||||
end
|
end
|
||||||
if iname=="plate" then
|
|
||||||
-- goblins cannot use plate
|
|
||||||
return race~="goblin"
|
|
||||||
end
|
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue