diff --git a/game/engines/default/engine/Zone.lua b/game/engines/default/engine/Zone.lua index 2910c631ac7eb23a066aae9a50ca8781c5f919a7..553f0a81b72055dce2074c2ac15ecba39a80a461 100644 --- a/game/engines/default/engine/Zone.lua +++ b/game/engines/default/engine/Zone.lua @@ -167,7 +167,7 @@ function _M:checkFilter(e, filter, type) if not filter then return true end if filter.ignore and self:checkFilter(e, filter.ignore, type) then return false end --- print("Checking filter", filter.type, filter.subtype) + forceprint("Checking filter", filter.type, filter.subtype, "::", e.type,e.subtype,e.name) if filter.type and filter.type ~= e.type then return false end if filter.subtype and filter.subtype ~= e.subtype then return false end if filter.name and filter.name ~= e.name then return false end diff --git a/game/modules/tome/ai/tactical.lua b/game/modules/tome/ai/tactical.lua index a944d46abf141cdb7dd65e6b6db489a129d221ab..a460aadb794fc16040b4fcad38c31aa7b4a77eb7 100644 --- a/game/modules/tome/ai/tactical.lua +++ b/game/modules/tome/ai/tactical.lua @@ -279,22 +279,22 @@ newAI("use_tactical", function(self) if avail.attack and self.ai_target.actor then -- Use the foe/ally ratio from the best attack talent table.sort(avail.attack, function(a,b) return a.val > b.val end) - want.attack = (avail.attack[1].nb_foes_hit or 1) - ally_compassion * (avail.attack[1].nb_allies_hit or 0) - self_compassion * (avail.attack[1].nb_self_hit or 0) + want.attack = avail.attack[1].val end if avail.disable and self.ai_target.actor then -- Use the foe/ally ratio from the best disable talent table.sort(avail.disable, function(a,b) return a.val > b.val end) - want.disable = (want.attack or 0) + (avail.disable[1].nb_foes_hit or 1) - ally_compassion * (avail.disable[1].nb_allies_hit or 0) - self_compassion * (avail.disable[1].nb_self_hit or 0) + want.disable = (want.attack or 0) + avail.disable[1].val end if avail.attackarea and self.ai_target.actor then -- Use the foe/ally ratio from the best attackarea talent table.sort(avail.attackarea, function(a,b) return a.val > b.val end) - want.attackarea = (want.attack or 0) + (avail.attackarea[1].nb_foes_hit or nb_foes_seen) - ally_compassion * (avail.attackarea[1].nb_allies_hit or nb_allies_seen) - self_compassion * (avail.attackarea[1].nb_self_hit or 0) + want.attackarea = avail.attackarea[1].val end -- Need buffs if avail.buff and want.attack and want.attack > 0 then - want.buff = math.max(0.01, want.attack - 1) + want.buff = math.max(0.01, want.attack + 0.5) end print("Tactical ai report for", self.name) diff --git a/game/modules/tome/class/GameState.lua b/game/modules/tome/class/GameState.lua index fa7613824f91ed4a8eef295ca716bee70956032d..88bd04ba9ece053e1b8e32d28e0432307d77b205 100644 --- a/game/modules/tome/class/GameState.lua +++ b/game/modules/tome/class/GameState.lua @@ -949,7 +949,7 @@ function _M:entityFilter(zone, e, filter, type) if not filter.ingore_material_restriction then local min_mlvl = util.getval(zone.min_material_level) local max_mlvl = util.getval(zone.max_material_level) - if min_mlvl then + if min_mlvl and not e.material_level_min_only then if not e.material_level then return true end if e.material_level < min_mlvl then return false end end diff --git a/game/modules/tome/class/generator/actor/Arena.lua b/game/modules/tome/class/generator/actor/Arena.lua index d3887a073e5b443b09487a1a57d14376e8f1c66b..d20fec86fecb944e1cf9ad3c9b4865da8c7f659e 100644 --- a/game/modules/tome/class/generator/actor/Arena.lua +++ b/game/modules/tome/class/generator/actor/Arena.lua @@ -478,7 +478,7 @@ function _M:generateOne(e) end else m.on_added = function (self) - if m.on_added_orig then m.on_added_orig(self) end + if self.on_added_orig then self.on_added_orig(self) end game.level.arena.danger = game.level.arena.danger + self.arenaPower end end diff --git a/game/modules/tome/data/general/npcs/orc-gorbat.lua b/game/modules/tome/data/general/npcs/orc-gorbat.lua index a5df85a101edaf185e6806119c9d89a907d36b6d..5c1907554901f8f96386a4abaf7449995137c45b 100644 --- a/game/modules/tome/data/general/npcs/orc-gorbat.lua +++ b/game/modules/tome/data/general/npcs/orc-gorbat.lua @@ -42,7 +42,7 @@ newEntity{ open_door = true, resolvers.sustains_at_birth(), - resolvers.inscriptions(2, "infusion"), +-- resolvers.inscriptions(2, "infusion"), autolevel = "warrior", ai = "dumb_talented_simple", ai_state = { ai_move="move_dmap", talent_in=3, }, @@ -55,6 +55,17 @@ newEntity{ end, } +newEntity{ base = "BASE_NPC_ORC_GORBAT", + name = "orc TEST", color=colors.YELLOW, + desc = [[A fierce orc attuned to the wilds.]], + level_range = {30, nil}, exp_worth = 1, + rarity = 1, + ai = "tactical", + ai_state = { talent_in=1, }, + rank=3, + resolvers.inscriptions(1, {"speed rune"}), +} + newEntity{ base = "BASE_NPC_ORC_GORBAT", name = "orc summoner", color=colors.YELLOW, desc = [[A fierce orc attuned to the wilds.]], @@ -110,7 +121,7 @@ newEntity{ base = "BASE_NPC_ORC_GORBAT", resolvers.racial(), } -newEntity{ base = "BASE_NPC_ORC", +newEntity{ base = "BASE_NPC_ORC_GORBAT", name = "orc master wyrmic", color=colors.LIGHT_STEEL_BLUE, desc = [[A fierce soldier-orc highly trained in the discipline of dragons.]], level_range = {30, nil}, exp_worth = 1, @@ -143,7 +154,7 @@ newEntity{ base = "BASE_NPC_ORC", resolvers.racial(), } -newEntity{ base = "BASE_NPC_ORC", +newEntity{ base = "BASE_NPC_ORC_GORBAT", name = "orc mage-hunter", color=colors.HONEYDEW, desc = [[An orc clad in massive armour, magic seems to die down all around him.]], level_range = {30, nil}, exp_worth = 1, diff --git a/game/modules/tome/data/general/objects/scrolls.lua b/game/modules/tome/data/general/objects/scrolls.lua index 1ec6bd56374c49c81aa402d847f5f12e1b130444..e39c1d12ec01a34714d7e5aa12670131a0078459 100644 --- a/game/modules/tome/data/general/objects/scrolls.lua +++ b/game/modules/tome/data/general/objects/scrolls.lua @@ -46,6 +46,7 @@ newEntity{ fire_destroy = {{100,1}, {200,2}, {400,5}, {600,10}, {1200,20}}, desc = [[Natural infusions may be grafted onto your body, granting you an on-demand ability.]], egos = "/data/general/objects/egos/infusions.lua", egos_chance = resolvers.mbonus(30, 5), + material_level_min_only = true, power_source = {nature=true}, use_simple = { name="inscribe your skin with the infusion.", use = function(self, who, inven, item) @@ -68,6 +69,7 @@ newEntity{ fire_destroy = {{10,1}, {20,2}, {40,5}, {60,10}, {120,20}}, desc = [[Magical runes may be inscribed onto your body, granting you an on-demand ability.]], egos = "/data/general/objects/egos/infusions.lua", egos_chance = resolvers.mbonus(30, 5), + material_level_min_only = true, power_source = {arcane=true}, use_simple = { name="inscribe your skin with the rune.", use = function(self, who, inven, item) @@ -356,7 +358,7 @@ newEntity{ base = "BASE_RUNE", dur = resolvers.mbonus_level(4, 3), power = resolvers.mbonus_level(30, 30, function(e, v) return v * 0.3 end), use_stat_mod = 0.3, - nb_uses = resolvers.mbonus_level(7, 4), + nb_uses = 2, --resolvers.mbonus_level(7, 4), }, inscription_talent = "RUNE:_SPEED", } diff --git a/game/modules/tome/data/talents/misc/inscriptions.lua b/game/modules/tome/data/talents/misc/inscriptions.lua index 6477ac115d94129c1d2b7891ff7d4239b62e7e0a..cacc178d037cc39821ccd1c2cbb850f0615be79d 100644 --- a/game/modules/tome/data/talents/misc/inscriptions.lua +++ b/game/modules/tome/data/talents/misc/inscriptions.lua @@ -410,7 +410,7 @@ newInscription{ type = {"inscriptions/runes", 1}, points = 1, is_spell = true, - tactical = { DEFEND = 1, ESCAPE = 1 }, + tactical = { DEFEND = 3, ESCAPE = 2 }, action = function(self, t) local data = self:getInscriptionData(t.short_name) self:setEffect(self.EFF_INVISIBILITY, data.dur, {power=data.power + data.inc_stat}) @@ -434,7 +434,7 @@ newInscription{ points = 1, is_spell = true, no_energy = true, - tactical = { BUFF = 2 }, + tactical = { BUFF = 4 }, action = function(self, t) local data = self:getInscriptionData(t.short_name) self:setEffect(self.EFF_SPEED, data.dur, {power=(data.power + data.inc_stat) / 100})