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

tiles

git-svn-id: http://svn.net-core.org/repos/t-engine4@3494 51575b47-30f0-44d4-a5cc-537603b46e54
parent 4894efed
No related branches found
No related tags found
No related merge requests found
Showing
with 7 additions and 3 deletions
......@@ -736,7 +736,7 @@ end
--- Checks the given coords to see if they are in bound
function _M:isBound(x, y)
if x < 0 or x >= self.w or y < 0 or y >= self.h then return false end
if x and y and x < 0 or x >= self.w or y < 0 or y >= self.h then return false end
return true
end
......
......@@ -132,7 +132,7 @@ function _M:doAI()
end
function _M:runAI(ai)
if not ai then return end
if not ai or not self.x then return end
return _M.ai_def[ai](self)
end
......
......@@ -21,6 +21,7 @@
-- this requires the ActorFOV interface, or an interface that provides self.fov.actors*
-- This is ToME specific, overriding the engine default target_simple to account for lite, infravision, ...
newAI("target_simple", function(self)
if not self.x then return end
if self.ai_target.actor and not self.ai_target.actor.dead and game.level:hasEntity(self.ai_target.actor) and rng.percent(90) and not self.ai_target.actor:attr("invulnerable") then return true end
-- Find closer enemy and target it
......@@ -33,7 +34,7 @@ newAI("target_simple", function(self)
act = self.fov.actors_dist[i]
-- print("AI looking for target", self.uid, self.name, "::", act.uid, act.name, self.fov.actors[act].sqdist)
-- find the closest enemy
if act and self:reactionToward(act) < 0 and not act.dead and
if act and self:reactionToward(act) < 0 and not act.dead and act.x and game.level.map:isBound(act.x, act.y) and
(
-- If it has lite we can always see it
((act.lite or 0) > 0)
......
game/modules/tome/data/gfx/shockbolt/npc/humanoid_dwarf_dwarven_paddlestriker.png

7.74 KiB

game/modules/tome/data/gfx/shockbolt/npc/humanoid_orc_orc_greatmother.png

17.8 KiB

game/modules/tome/data/gfx/shockbolt/npc/spiderkin_spider_ungole.png

10.4 KiB

game/modules/tome/data/gfx/shockbolt/npc/undead_mummy_ancient_elven_mummy.png

7.89 KiB

game/modules/tome/data/gfx/shockbolt/npc/undead_mummy_animated_mummy_wrappings.png

8.71 KiB

game/modules/tome/data/gfx/shockbolt/npc/undead_mummy_greater_mummy_lord.png

9.23 KiB

game/modules/tome/data/gfx/shockbolt/npc/undead_mummy_rotting_mummy.png

7.58 KiB

game/modules/tome/data/gfx/shockbolt/npc/undead_rodent_skeletal_rat.png

6.89 KiB

......@@ -26,6 +26,7 @@ local Talents = require("engine.interface.ActorTalents")
newEntity{ define_as = "UNGOLE", base = "BASE_NPC_SPIDER",
allow_infinite_dungeon = true,
name = "Ungolë", color=colors.VIOLET, unique = true,
resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/spiderkin_spider_ungole.png", display_h=2, display_y=-1}}},
desc = [[A huge spider, shrouded in darkness, with red glowing eyes darting at you. She looks hungry.]],
level_range = {30, nil}, exp_worth = 2,
max_life = 450, life_rating = 15, fixed_rating = true,
......
......@@ -60,6 +60,7 @@ newEntity{ define_as = "BASE_NPC_ARENA1",
newEntity{ name = "skeletal rat",
base = "BASE_NPC_RODENT",
define_as = "SKELERAT",
type = "undead",
desc = [[The diminutive skeleton of a giant rat, charged with evil energies. Nobody understands the usefulness of undead rodents until several of them come after you]],
color = colors.GOLD,
level_range = {3, 4},
......
......@@ -99,6 +99,7 @@ newEntity{ base = "BASE_NPC_ORC",
newEntity{ base="BASE_NPC_ORC", define_as = "GREATMOTHER",
name = "Orc Greatmother", color=colors.VIOLET, unique = true,
resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/humanoid_orc_orc_greatmother.png", display_h=2, display_y=-1}}},
desc = [[Here stands a tremendous form almost the size of a dragon. Bloated skin rises in thick folds, seeping viscous slime from its wide pores. Hundreds of hanging teats feed a small army of squabbling, fighting young orcs - only the toughest of them are able to gain the precious nutrients to grow stronger, the weaker ones left to wither on the mouldy floor. Dozens of gaping vulvae squelch and pulsate, pushing out new young with alarming rapidity. At the top of this towering hulk is a shrivelled head coated in long tangled hair. Dazed eyes peer out with a mixture of sadness and pain, but as they fix on you they turn to anger, the creature's face contorted with the fierce desire to protect its young.]],
level_range = {40, nil}, exp_worth = 1,
rank = 5,
......
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