Skip to content
Snippets Groups Projects
Commit 01203ecd authored by Chris Davidson's avatar Chris Davidson
Browse files

Revise and add a bunch of autoequip filters

parent c09e52e9
No related branches found
No related tags found
1 merge request!527Misc is miscellaneous
......@@ -90,6 +90,17 @@ newBirthDescriptor{
},
copy = {
max_life = 110,
resolvers.auto_equip_filters{
MAINHAND = {type="weapon", properties={"twohanded"}},
OFFHAND = {special=function(e, filter) -- only allow if there is already a weapon in MAINHAND
local who = filter._equipping_entity
if who then
local mh = who:getInven(who.INVEN_MAINHAND) mh = mh and mh[1]
if mh and (not mh.slot_forbid or not who:slotForbidCheck(e, who.INVEN_MAINHAND)) then return true end
end
return false
end},
},
resolvers.equipbirth{ id=true,
{type="weapon", subtype="battleaxe", name="iron battleaxe", autoreq=true, ego_chance=-1000},
{type="armor", subtype="heavy", name="iron mail armour", autoreq=true, ego_chance=-1000, ego_chance=-1000}
......
......@@ -84,14 +84,17 @@ newBirthDescriptor{
},
copy = {
resolvers.auto_equip_filters{
MAINHAND = {type="weapon", special=function(e, filter) -- allow any weapon that doesn't forbid OFFHAND
if e.slot_forbid == "OFFHAND" then
local who = filter._equipping_entity
return who and not who:slotForbidCheck(e, who.INVEN_MAINHAND)
MAINHAND = {type="weapon", not_properties={"twohanded"}, special=function(e, filter) -- Allow standard 1H strength weapons and 1H staves, not currently working with ogre
local who = filter._equipping_entity
if who and e.subtype and (e.subtype == "staff" or e.subtype == "waraxe" or e.subtype == "longsword" or e.subtype == "mace") then return true end
end},
OFFHAND = {type="weapon", not_properties={"twohanded"}, special=function(e, filter)
local who = filter._equipping_entity
if who then
local mh = who:getInven(who.INVEN_MAINHAND) mh = mh and mh[1]
if mh and (not mh.slot_forbid or not who:slotForbidCheck(e, who.INVEN_MAINHAND)) and e.subtype and (e.subtype == "staff" or e.subtype == "waraxe" or e.subtype == "longsword" or e.subtype == "mace") then return true end
end
return true
end},
OFFHAND = {type="weapon", not_properties={"twohanded"}}
},
resolvers.equipbirth{ id=true,
{type="weapon", subtype="waraxe", name="iron waraxe", autoreq=true, ego_chance=-1000},
......
......@@ -100,6 +100,20 @@ newBirthDescriptor{
},
copy = {
max_life = 110,
resolvers.auto_equip_filters{
MAINHAND = {type="weapon", special=function(e, filter) -- Allow standard 2H strength weapons
local who = filter._equipping_entity
if who and e.subtype and (e.subtype == "battleaxe" or e.subtype == "greatsword" or e.subtype == "greatmaul") then return true end
end},
OFFHAND = {special=function(e, filter) -- only allow if there is already a weapon in MAINHAND
local who = filter._equipping_entity
if who then
local mh = who:getInven(who.INVEN_MAINHAND) mh = mh and mh[1]
if mh and (not mh.slot_forbid or not who:slotForbidCheck(e, who.INVEN_MAINHAND)) then return true end
end
return false
end},
},
resolvers.equipbirth{ id=true,
{type="armor", subtype="cloth", name="linen robe", autoreq=true, ego_chance=-1000},
{type="weapon", subtype="greatsword", name="iron greatsword", autoreq=true, ego_chance=-1000},
......@@ -132,7 +146,6 @@ newBirthDescriptor{
"#GOLD#Life per level:#LIGHT_BLUE# -4 (*special*)",
},
power_source = {psionic=true},
-- not_on_random_boss = true,
random_rarity = 3,
stats = { str=0, wil=5, cun=4, },
birth_example_particles = {
......@@ -171,6 +184,10 @@ newBirthDescriptor{
},
copy = {
max_life = 90,
resolvers.auto_equip_filters{
MAINHAND = {type="weapon", subtype="mindstar"},
OFFHAND = {type="weapon", subtype="mindstar"},
},
resolvers.equipbirth{ id=true,
{type="armor", subtype="cloth", name="linen robe", autoreq=true, ego_chance=-1000},
{type="weapon", subtype="mindstar", name="mossy mindstar", autoreq=true, ego_chance=-1000},
......
......@@ -312,12 +312,22 @@ newBirthDescriptor{
},
copy = {
max_life = 100,
-- talent_cd_reduction={[ActorTalents.T_FLAME]=-3, [ActorTalents.T_LIGHTNING]=-3, [ActorTalents.T_EARTHEN_MISSILES]=-3, },
resolvers.auto_equip_filters{
MAINHAND = {type="weapon", properties={"twohanded"}},
OFFHAND = {special=function(e, filter) -- only allow if there is already a weapon in MAINHAND
local who = filter._equipping_entity
if who then
local mh = who:getInven(who.INVEN_MAINHAND) mh = mh and mh[1]
if mh and (not mh.slot_forbid or not who:slotForbidCheck(e, who.INVEN_MAINHAND)) then return true end
end
return false
end},
},
resolvers.equipbirth{ id=true,
{type="weapon", subtype="greatsword", name="iron greatsword", autoreq=true, ego_chance=-1000, ego_chance=-1000},
{type="armor", subtype="light", name="rough leather armour", autoreq=true, ego_chance=-1000, ego_chance=-1000},
},
resolvers.inscription("RUNE:_MANASURGE", {cooldown=25, dur=10, mana=620}),
resolvers.inscription("RUNE:_MANASURGE", {cooldown=25, dur=10, mana=620}, 3),
},
copy_add = {
life_rating = 2,
......
......@@ -94,6 +94,10 @@ newBirthDescriptor{
},
copy = {
max_life = 90,
resolvers.auto_equip_filters{
MAINHAND = {type="weapon", subtype="mindstar"},
OFFHAND = {type="weapon", subtype="mindstar"},
},
resolvers.equipbirth{ id=true,
{type="weapon", subtype="mindstar", name="mossy mindstar", autoreq=true, ego_chance=-1000},
{type="weapon", subtype="mindstar", name="mossy mindstar", autoreq=true, ego_chance=-1000},
......@@ -153,6 +157,17 @@ newBirthDescriptor{
copy = {
drake_touched = 2,
max_life = 110,
resolvers.auto_equip_filters{ -- This could be improved to check learned trees since Wyrmics can use a lot of weapons
MAINHAND = {type="weapon", properties={"twohanded"}},
OFFHAND = {special=function(e, filter) -- only allow if there is already a weapon in MAINHAND
local who = filter._equipping_entity
if who then
local mh = who:getInven(who.INVEN_MAINHAND) mh = mh and mh[1]
if mh and (not mh.slot_forbid or not who:slotForbidCheck(e, who.INVEN_MAINHAND)) then return true end
end
return false
end},
},
resolvers.equipbirth{ id=true,
{type="weapon", subtype="battleaxe", name="iron battleaxe", autoreq=true, ego_chance=-1000},
{type="armor", subtype="heavy", name="iron mail armour", autoreq=true, ego_chance=-1000, ego_chance=-1000} },
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment