Skip to content
Snippets Groups Projects
Commit 4c40a021 authored by dg's avatar dg
Browse files

NPCs get auto_req=true on their equipments

added skeleton archers & armoured skeletons warrior


git-svn-id: http://svn.net-core.org/repos/t-engine4@433 51575b47-30f0-44d4-a5cc-537603b46e54
parent 52e06cde
No related branches found
No related tags found
No related merge requests found
......@@ -9,7 +9,7 @@ _M.factions = {}
-- Static method
function _M:add(t)
assert(t.name, "no faction name")
assert(t.short_name, "no faction short_name")
t.short_name = t.short_name or t.name:lower():gsub(" ", "-")
t.reaction = t.reaction or {}
self.factions[t.short_name] = t
end
......@@ -27,6 +27,5 @@ function _M:factionReaction(f1, f2)
end
-- Add a few default factions
_M:add{ short_name="players", name="Players", reaction={enemies=-100} }
_M:add{ short_name="enemies", name="Enemies", reaction={players=-100,poorsods=-100} }
_M:add{ short_name="poorsods", name="Poor Sods", reaction={} }
_M:add{ name="Players", reaction={enemies=-100} }
_M:add{ name="Enemies", reaction={players=-100} }
......@@ -7,6 +7,7 @@ newAI("dumb_talented", function(self)
local target_dist = math.floor(core.fov.distance(self.x, self.y, self.ai_target.actor.x, self.ai_target.actor.y))
for tid, _ in pairs(self.talents) do
local t = self:getTalentFromId(tid)
-- print(self.name, self.uid, "dumb ai talents can try use", t.name, tid, "::", t.mode, not self:isTalentCoolingDown(t), target_dist <= self:getTalentRange(t), self:preUseTalent(t, true), self:canProject({type="bolt"}, self.ai_target.actor.x, self.ai_target.actor.y))
if t.mode == "activated" and not self:isTalentCoolingDown(t) and target_dist <= self:getTalentRange(t) and self:preUseTalent(t, true) and self:canProject({type="bolt"}, self.ai_target.actor.x, self.ai_target.actor.y) then
avail[#avail+1] = tid
print(self.name, self.uid, "dumb ai talents can use", t.name, tid)
......
......@@ -28,11 +28,11 @@ Autolevel:registerScheme{ name = "rogue", levelup = function(self)
learnStats(self, { self.STAT_DEX, self.STAT_CUN, self.STAT_CUN })
end}
Autolevel:registerScheme{ name = "archer", levelup = function(self)
Autolevel:registerScheme{ name = "slinger", levelup = function(self)
learnStats(self, { self.STAT_DEX, self.STAT_DEX, self.STAT_CUN })
end}
Autolevel:registerScheme{ name = "slinger", levelup = function(self)
Autolevel:registerScheme{ name = "archer", levelup = function(self)
learnStats(self, { self.STAT_DEX, self.STAT_DEX, self.STAT_STR })
end}
......
......@@ -26,7 +26,7 @@ newEntity{
newEntity{ base = "BASE_NPC_MINOTAUR",
name = "minotaur", color=colors.UMBER,
desc = [[It is a cross between a human and a bull.]],
equipment = resolvers.equip{ {type="weapon", subtype="battleaxe"}, },
resolvers.equip{ {type="weapon", subtype="battleaxe", autoreq=true}, },
level_range = {10, 50}, exp_worth = 1,
rarity = 9,
combat_armor = 13, combat_def = 8,
......@@ -39,7 +39,7 @@ newEntity{ base = "BASE_NPC_MINOTAUR",
level_range = {20, 50}, exp_worth = 1,
rarity = 15,
combat_armor = 15, combat_def = 7,
equipment = resolvers.equip{ {type="weapon", subtype="maul"} },
resolvers.equip{ {type="weapon", subtype="maul", autoreq=true} },
autolevel = "caster",
resists = { [DamageType.FIRE] = 100 },
......
......@@ -7,8 +7,7 @@ newEntity{
combat = { dam=1, atk=1, apr=1 },
body = { INVEN = 10, MAINHAND=1, OFFHAND=1, BODY=1 },
equipment = resolvers.equip{ {type="weapon", subtype="greatsword"} },
body = { INVEN = 10, MAINHAND=1, OFFHAND=1, BODY=1, QUIVER=1 },
resolvers.drops{chance=20, nb=1, {} },
resolvers.drops{chance=60, nb=1, {type="money"} },
......@@ -27,18 +26,20 @@ newEntity{
newEntity{ base = "BASE_NPC_SKELETON",
name = "degenerated skeleton warrior", color=colors.WHITE,
level_range = {1, 50}, exp_worth = 1,
level_range = {1, 18}, exp_worth = 1,
rarity = 4,
resolvers.equip{ {type="weapon", subtype="greatsword", autoreq=true} },
max_life = resolvers.rngavg(40,50),
combat_armor = 5, combat_def = 1,
}
newEntity{ base = "BASE_NPC_SKELETON",
name = "skeleton warrior", color=colors.SLATE,
level_range = {2, 50}, exp_worth = 1,
rarity = 3,
level_range = {3, 50}, exp_worth = 1,
rarity = 4,
max_life = resolvers.rngavg(90,100),
combat_armor = 5, combat_def = 1,
resolvers.equip{ {type="weapon", subtype="greatsword", autoreq=true} },
resolvers.talents{ [Talents.T_STAMINA_POOL]=1, [Talents.T_STUNNING_BLOW]=1, },
ai_state = { talent_in=1, },
}
......@@ -53,8 +54,50 @@ newEntity{ base = "BASE_NPC_SKELETON",
stats = { str=10, dex=12, cun=14, mag=14, con=10 },
resolvers.talents{ [Talents.T_MANA_POOL]=1, [Talents.T_FLAME]=2, [Talents.T_MANATHRUST]=3 },
equipment = resolvers.equip{ {type="weapon", subtype="staff"} },
resolvers.equip{ {type="weapon", subtype="staff", autoreq=true} },
autolevel = "caster",
ai = "dumb_talented_simple", ai_state = { talent_in=6, },
}
newEntity{ base = "BASE_NPC_SKELETON",
name = "skeleton archer", color=colors.UMBER,
level_range = {5, 50}, exp_worth = 1,
rarity = 6,
max_life = resolvers.rngavg(70,80),
combat_armor = 5, combat_def = 1,
resolvers.talents{ [Talents.T_STAMINA_POOL]=1, [Talents.T_SHOOT]=1, },
ai_state = { talent_in=1, },
autolevel = "archer",
resolvers.equip{ {type="weapon", subtype="longbow", autoreq=true}, {type="ammo", subtype="arrow", autoreq=true} },
}
newEntity{ base = "BASE_NPC_SKELETON",
name = "skeleton master archer", color=colors.LIGHT_UMBER,
level_range = {15, 50}, exp_worth = 1,
rarity = 7,
max_life = resolvers.rngavg(70,80),
combat_armor = 5, combat_def = 1,
resolvers.talents{ [Talents.T_STAMINA_POOL]=1, [Talents.T_SHOOT]=1, [Talents.T_PINNING_SHOT]=3, [Talents.T_CRIPPLING_SHOT]=3, },
ai_state = { talent_in=1, },
autolevel = "archer",
resolvers.equip{ {type="weapon", subtype="longbow", autoreq=true}, {type="ammo", subtype="arrow", autoreq=true} },
}
newEntity{ base = "BASE_NPC_SKELETON",
name = "armoured skeleton warrior", color=colors.STEEL_BLUE,
level_range = {10, 50}, exp_worth = 1,
rarity = 8,
max_life = resolvers.rngavg(90,100),
combat_armor = 5, combat_def = 1,
resolvers.talents{
[Talents.T_HEAVY_ARMOUR_TRAINING]=1,
[Talents.T_SHIELD_PUMMEL]=1,
[Talents.T_RIPOSTE]=3,
[Talents.T_OVERPOWER]=1,
},
resolvers.equip{ {type="weapon", subtype="longsword", autoreq=true}, {type="armor", subtype="shield", autoreq=true}, {type="armor", subtype="heavy", autoreq=true} },
ai_state = { talent_in=1, },
}
......@@ -9,7 +9,7 @@ newEntity{
body = { INVEN = 10, MAINHAND=1, OFFHAND=1, BODY=1 },
drops = resolvers.drops{chance=20, nb=1, {} },
equipment = resolvers.equip{ {type="weapon", subtype="dagger"}, {type="weapon", subtype="dagger"}, {type="armor", subtype="light"} },
resolvers.equip{ {type="weapon", subtype="dagger", autoreq=true}, {type="weapon", subtype="dagger", autoreq=true}, {type="armor", subtype="light", autoreq=true} },
resolvers.drops{chance=100, nb=2, {type="money"} },
max_stamina = 100,
......
......@@ -24,6 +24,7 @@ newTalent{
cooldown = 3,
stamina = 8,
require = techs_dex_req1,
range = 20,
action = function(self, t)
self:archeryShoot(nil, 1.2 + self:getTalentLevel(t) / 5)
return true
......@@ -117,6 +118,7 @@ newTalent{
cooldown = 20,
stamina = 35,
require = techs_dex_req4,
range = 20,
action = function(self, t)
self.combat_physcrit = self.combat_physcrit + 1000
self:archeryShoot(nil, 1.2 + self:getTalentLevel(t) / 4)
......@@ -174,6 +176,7 @@ newTalent{
cooldown = 20,
stamina = 15,
require = techs_dex_req2,
range = 20,
action = function(self, t)
self:archeryShoot(nil, 1 + self:getTalentLevel(t) / 6, function(target, x, y)
if target:checkHit(self:combatAttackDex(), target:combatPhysicalResist(), 0, 95, 10) then
......@@ -197,6 +200,7 @@ newTalent{
cooldown = 20,
stamina = 15,
require = techs_dex_req3,
range = 20,
action = function(self, t)
self:archeryShoot(nil, 1 + self:getTalentLevel(t) / 6, function(target, x, y)
if target:checkHit(self:combatAttackDex(), target:combatPhysicalResist(), 0, 95, 10) then
......@@ -220,6 +224,7 @@ newTalent{
cooldown = 20,
stamina = 15,
require = techs_dex_req4,
range = 20,
action = function(self, t)
self:archeryShoot(nil, 1 + self:getTalentLevel(t) / 6, function(target, x, y)
if target:checkHit(self:combatAttackDex(), target:combatPhysicalResist(), 0, 95, 10) then
......
......@@ -17,6 +17,7 @@ newTalent{
cooldown = 8,
stamina = 15,
require = techs_dex_req2,
range = 20,
action = function(self, t)
self.combat_apr = self.combat_apr + 1000
self:archeryShoot(nil, 1.2 + self:getTalentLevel(t) / 7, nil, {type="beam"}, {one_shot=true})
......@@ -36,6 +37,7 @@ newTalent{
cooldown = 8,
stamina = 15,
require = techs_dex_req3,
range = 20,
action = function(self, t)
self:archeryShoot(nil, 1.2 + self:getTalentLevel(t) / 5, nil, {type="ball", radius=1}, {limit_shots=2})
return true
......@@ -53,6 +55,7 @@ newTalent{
cooldown = 20,
stamina = 35,
require = techs_dex_req4,
range = 20,
action = function(self, t)
self:archeryShoot(nil, 0.7 + self:getTalentLevel(t) / 5, nil, {type="ball", radius=2 + self:getTalentLevel(t)/3, firendlyfire=false})
return true
......
......@@ -17,6 +17,7 @@ newTalent{
cooldown = 8,
stamina = 15,
require = techs_dex_req2,
range = 20,
action = function(self, t)
self:archeryShoot(nil, 1.2 + self:getTalentLevel(t) / 5, function(target, x, y)
if target:checkHit(self:combatAttackDex(), target:combatPhysicalResist(), 0, 95, 10) and target:canBe("blind") then
......@@ -40,6 +41,7 @@ newTalent{
cooldown = 8,
stamina = 15,
require = techs_dex_req3,
range = 20,
action = function(self, t)
self:archeryShoot(nil, 1.2 + self:getTalentLevel(t) / 5, function(target, x, y)
if target:checkHit(self:combatAttackDex(), target:combatPhysicalResist(), 0, 95, 15) and target:canBe("knockback") then
......@@ -64,6 +66,7 @@ newTalent{
cooldown = 20,
stamina = 35,
require = techs_dex_req4,
range = 20,
action = function(self, t)
self:archeryShoot(nil, 0.7 + self:getTalentLevel(t) / 5, nil, nil, {multishots=2+self:getTalentLevelRaw(t)/2})
return true
......
......@@ -9,8 +9,8 @@ newEntity{ define_as = "THE_MASTER",
name = "The Master",
display = "V", color=colors.VIOLET,
desc = [[This elder vampire seems to be in control here and does not seem very happy about you.]],
level_range = {18, 25}, exp_worth = 2,
max_life = 350, life_rating = 15, fixed_rating = true,
level_range = {23, 35}, exp_worth = 2,
max_life = 350, life_rating = 19, fixed_rating = true,
max_mana = 145,
max_stamina = 145,
stats = { str=19, dex=19, cun=34, mag=25, con=16 },
......@@ -29,6 +29,7 @@ newEntity{ define_as = "THE_MASTER",
},
blind_immune = 1,
stun_immone = 0.7,
see_invisible = 20,
undead = 1,
......
No preview for this file type
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