From c3c3da8aa37c6af0729629aed32277e5ed185012 Mon Sep 17 00:00:00 2001 From: dg <dg@51575b47-30f0-44d4-a5cc-537603b46e54> Date: Wed, 19 Jan 2011 00:40:48 +0000 Subject: [PATCH] The sentient creatures of Maj'Eyal have created a loby to counter the players. They demand to have access to random runes and infusions. Their demand has been fulfilled! git-svn-id: http://svn.net-core.org/repos/t-engine4@2426 51575b47-30f0-44d4-a5cc-537603b46e54 --- .../tome/data/general/npcs/elven-caster.lua | 1 + .../tome/data/general/npcs/elven-warrior.lua | 1 + .../tome/data/general/npcs/major-demon.lua | 2 ++ game/modules/tome/data/general/npcs/minotaur.lua | 3 +++ game/modules/tome/data/general/npcs/mummy.lua | 1 + game/modules/tome/data/general/npcs/naga.lua | 2 ++ .../modules/tome/data/general/npcs/orc-gorbat.lua | 2 ++ .../tome/data/general/npcs/orc-grushnak.lua | 1 + .../tome/data/general/npcs/orc-rak-shor.lua | 1 + game/modules/tome/data/general/npcs/orc-vor.lua | 2 ++ game/modules/tome/data/general/npcs/orc.lua | 8 ++++++++ game/modules/tome/data/general/npcs/skeleton.lua | 1 + .../modules/tome/data/general/npcs/snow-giant.lua | 2 ++ game/modules/tome/data/general/npcs/spider.lua | 2 ++ game/modules/tome/data/general/npcs/thieve.lua | 2 ++ game/modules/tome/data/general/npcs/troll.lua | 1 + game/modules/tome/data/general/npcs/vampire.lua | 4 ++++ game/modules/tome/data/general/npcs/ziguranth.lua | 1 + .../tome/data/zones/ruins-kor-pul/npcs.lua | 2 +- game/modules/tome/resolvers.lua | 15 ++++++++++++--- 20 files changed, 50 insertions(+), 4 deletions(-) diff --git a/game/modules/tome/data/general/npcs/elven-caster.lua b/game/modules/tome/data/general/npcs/elven-caster.lua index 9426deff2b..7fd39859ba 100644 --- a/game/modules/tome/data/general/npcs/elven-caster.lua +++ b/game/modules/tome/data/general/npcs/elven-caster.lua @@ -43,6 +43,7 @@ newEntity{ silence_immune = 0.5, resolvers.talents{ [Talents.T_HEAVY_ARMOUR_TRAINING]=1, }, + resolvers.inscriptions(1, "rune"), autolevel = "caster", ai = "dumb_talented_simple", ai_state = { ai_move="move_dmap", talent_in=1, }, diff --git a/game/modules/tome/data/general/npcs/elven-warrior.lua b/game/modules/tome/data/general/npcs/elven-warrior.lua index 021b5a62d5..158ce92470 100644 --- a/game/modules/tome/data/general/npcs/elven-warrior.lua +++ b/game/modules/tome/data/general/npcs/elven-warrior.lua @@ -42,6 +42,7 @@ newEntity{ open_door = true, resolvers.talents{ [Talents.T_HEAVY_ARMOUR_TRAINING]=1, }, + resolvers.inscriptions(1, "rune"), autolevel = "warrior", ai = "dumb_talented_simple", ai_state = { ai_move="move_dmap", talent_in=3, }, diff --git a/game/modules/tome/data/general/npcs/major-demon.lua b/game/modules/tome/data/general/npcs/major-demon.lua index 7b50204a69..85c77960a2 100644 --- a/game/modules/tome/data/general/npcs/major-demon.lua +++ b/game/modules/tome/data/general/npcs/major-demon.lua @@ -40,6 +40,8 @@ newEntity{ size_category = 3, no_breath = 1, demon = 1, + + resolvers.inscriptions(1, "rune"), } newEntity{ base = "BASE_NPC_MAJOR_DEMON", diff --git a/game/modules/tome/data/general/npcs/minotaur.lua b/game/modules/tome/data/general/npcs/minotaur.lua index eeb6d9c882..18b5e46ac9 100644 --- a/game/modules/tome/data/general/npcs/minotaur.lua +++ b/game/modules/tome/data/general/npcs/minotaur.lua @@ -40,6 +40,9 @@ newEntity{ open_door = true, + resolvers.inscriptions(1, "rune"), + resolvers.inscriptions(1, "infusion"), + autolevel = "warrior", ai = "dumb_talented_simple", ai_state = { ai_move="move_dmap", talent_in=5, }, energy = { mod=1.2 }, diff --git a/game/modules/tome/data/general/npcs/mummy.lua b/game/modules/tome/data/general/npcs/mummy.lua index a6a1cce08c..fa3f359d2a 100644 --- a/game/modules/tome/data/general/npcs/mummy.lua +++ b/game/modules/tome/data/general/npcs/mummy.lua @@ -37,6 +37,7 @@ newEntity{ open_door = true, + resolvers.inscriptions(1, "rune"), resolvers.tmasteries{ ["technique/2hweapon-offense"]=1, ["technique/2hweapon-cripple"]=1, }, blind_immune = 1, diff --git a/game/modules/tome/data/general/npcs/naga.lua b/game/modules/tome/data/general/npcs/naga.lua index 81813d4a43..9eaf7c6974 100644 --- a/game/modules/tome/data/general/npcs/naga.lua +++ b/game/modules/tome/data/general/npcs/naga.lua @@ -37,6 +37,8 @@ newEntity{ size_category = 3, open_door = true, + resolvers.inscriptions(1, "infusion"), + resolvers.inscriptions(1, "rune"), autolevel = "warrior", ai = "dumb_talented_simple", ai_state = { ai_move="move_dmap", talent_in=1, }, diff --git a/game/modules/tome/data/general/npcs/orc-gorbat.lua b/game/modules/tome/data/general/npcs/orc-gorbat.lua index b14e41a3b5..16f0e02e17 100644 --- a/game/modules/tome/data/general/npcs/orc-gorbat.lua +++ b/game/modules/tome/data/general/npcs/orc-gorbat.lua @@ -40,6 +40,8 @@ newEntity{ open_door = true, resolvers.sustains_at_birth(), + resolvers.inscriptions(2, "infusion"), + autolevel = "warrior", ai = "dumb_talented_simple", ai_state = { ai_move="move_dmap", talent_in=3, }, energy = { mod=1 }, diff --git a/game/modules/tome/data/general/npcs/orc-grushnak.lua b/game/modules/tome/data/general/npcs/orc-grushnak.lua index fb4954e2cf..c3f258810f 100644 --- a/game/modules/tome/data/general/npcs/orc-grushnak.lua +++ b/game/modules/tome/data/general/npcs/orc-grushnak.lua @@ -39,6 +39,7 @@ newEntity{ open_door = true, resolvers.sustains_at_birth(), + resolvers.inscriptions(3, "infusion"), autolevel = "warrior", ai = "dumb_talented_simple", ai_state = { ai_move="move_dmap", talent_in=3, }, diff --git a/game/modules/tome/data/general/npcs/orc-rak-shor.lua b/game/modules/tome/data/general/npcs/orc-rak-shor.lua index f1246cd796..c406d19e84 100644 --- a/game/modules/tome/data/general/npcs/orc-rak-shor.lua +++ b/game/modules/tome/data/general/npcs/orc-rak-shor.lua @@ -38,6 +38,7 @@ newEntity{ size_category = 3, open_door = true, + resolvers.inscriptions(3, "rune"), autolevel = "caster", ai = "dumb_talented_simple", ai_state = { ai_move="move_dmap", talent_in=1, }, diff --git a/game/modules/tome/data/general/npcs/orc-vor.lua b/game/modules/tome/data/general/npcs/orc-vor.lua index e6b47172d5..9c4a3fb3ac 100644 --- a/game/modules/tome/data/general/npcs/orc-vor.lua +++ b/game/modules/tome/data/general/npcs/orc-vor.lua @@ -40,6 +40,8 @@ newEntity{ open_door = true, + resolvers.inscriptions(2, "rune"), + autolevel = "caster", ai = "dumb_talented_simple", ai_state = { ai_move="move_dmap", talent_in=1, }, energy = { mod=1 }, diff --git a/game/modules/tome/data/general/npcs/orc.lua b/game/modules/tome/data/general/npcs/orc.lua index 2a15468d93..1156784a32 100644 --- a/game/modules/tome/data/general/npcs/orc.lua +++ b/game/modules/tome/data/general/npcs/orc.lua @@ -56,6 +56,7 @@ newEntity{ base = "BASE_NPC_ORC", {type="weapon", subtype="waraxe", autoreq=true}, {type="armor", subtype="shield", autoreq=true}, }, + resolvers.inscriptions(1, "infusion"), combat_armor = 2, combat_def = 0, resolvers.talents{ [Talents.T_SHIELD_PUMMEL]=1, }, } @@ -72,6 +73,7 @@ newEntity{ base = "BASE_NPC_ORC", ai_state = { talent_in=1, }, autolevel = "archer", + resolvers.inscriptions(1, "infusion"), resolvers.equip{ {type="weapon", subtype="longbow", autoreq=true}, {type="ammo", subtype="arrow", autoreq=true}, @@ -89,6 +91,7 @@ newEntity{ base = "BASE_NPC_ORC", define_as = "ORC", {type="weapon", subtype="battleaxe", autoreq=true}, }, combat_armor = 2, combat_def = 0, + resolvers.inscriptions(1, "infusion"), resolvers.talents{ [Talents.T_SUNDER_ARMOUR]=2, [Talents.T_CRUSH]=2, }, } @@ -105,6 +108,7 @@ newEntity{ base = "BASE_NPC_ORC", define_as = "ORC_FIRE_WYRMIC", }, combat_armor = 2, combat_def = 0, + resolvers.inscriptions(1, "infusion"), make_escort = { {type="humanoid", subtype="orc", name="orc soldier", number=resolvers.mbonus(3, 2)}, }, @@ -129,6 +133,7 @@ newEntity{ base = "BASE_NPC_ORC", }, combat_armor = 2, combat_def = 0, + resolvers.inscriptions(1, "infusion"), make_escort = { {type="humanoid", subtype="orc", name="orc soldier", number=resolvers.mbonus(3, 2)}, }, @@ -158,6 +163,7 @@ newEntity{ base = "BASE_NPC_ORC", [Talents.T_SHADOWSTRIKE]=3, }, max_life = resolvers.rngavg(80,100), + resolvers.inscriptions(1, "infusion"), resolvers.sustains_at_birth(), autolevel = "rogue", @@ -176,6 +182,7 @@ newEntity{ base = "BASE_NPC_ORC", {type="weapon", subtype="dagger", ego_chance=20, autoreq=true}, {type="armor", subtype="light", autoreq=true} }, + resolvers.inscriptions(1, "infusion"), resolvers.talents{ [Talents.T_STEALTH]=5, [Talents.T_LETHALITY]=4, @@ -201,6 +208,7 @@ newEntity{ base = "BASE_NPC_ORC", {type="weapon", subtype="dagger", ego_chance=20, autoreq=true}, {type="armor", subtype="light", autoreq=true} }, + resolvers.inscriptions(3, "infusion"), resolvers.talents{ [Talents.T_STEALTH]=5, [Talents.T_LETHALITY]=4, diff --git a/game/modules/tome/data/general/npcs/skeleton.lua b/game/modules/tome/data/general/npcs/skeleton.lua index 34a962280c..fe545b14d5 100644 --- a/game/modules/tome/data/general/npcs/skeleton.lua +++ b/game/modules/tome/data/general/npcs/skeleton.lua @@ -119,6 +119,7 @@ newEntity{ base = "BASE_NPC_SKELETON", max_life = resolvers.rngavg(90,100), combat_armor = 5, combat_def = 1, rank = 3, + resolvers.inscriptions(1, "rune"), resolvers.talents{ [Talents.T_HEAVY_ARMOUR_TRAINING]=1, [Talents.T_SHIELD_PUMMEL]=1, diff --git a/game/modules/tome/data/general/npcs/snow-giant.lua b/game/modules/tome/data/general/npcs/snow-giant.lua index 593e04f1f3..c4ecaaed2a 100644 --- a/game/modules/tome/data/general/npcs/snow-giant.lua +++ b/game/modules/tome/data/general/npcs/snow-giant.lua @@ -40,6 +40,8 @@ newEntity{ energy = { mod=1 }, stats = { str=20, dex=8, mag=6, con=16 }, + resolvers.inscriptions(1, "infusion"), + resists = { [DamageType.PHYSICAL] = 20, [DamageType.COLD] = 50, }, no_breath = 1, diff --git a/game/modules/tome/data/general/npcs/spider.lua b/game/modules/tome/data/general/npcs/spider.lua index f13ea246f9..337a5737d2 100644 --- a/game/modules/tome/data/general/npcs/spider.lua +++ b/game/modules/tome/data/general/npcs/spider.lua @@ -38,6 +38,8 @@ newEntity{ energy = { mod=1.2 }, stats = { str=15, dex=15, mag=8, con=10 }, + resolvers.inscriptions(2, "infusion"), + resolvers.tmasteries{ ["technique/other"]=0.3 }, resolvers.sustains_at_birth(), diff --git a/game/modules/tome/data/general/npcs/thieve.lua b/game/modules/tome/data/general/npcs/thieve.lua index fe13ca9f22..20fb278293 100644 --- a/game/modules/tome/data/general/npcs/thieve.lua +++ b/game/modules/tome/data/general/npcs/thieve.lua @@ -44,6 +44,8 @@ newEntity{ open_door = true, + resolvers.inscriptions(1, "infusion"), + autolevel = "rogue", ai = "dumb_talented_simple", ai_state = { ai_move="move_dmap", talent_in=5, }, energy = { mod=1 }, diff --git a/game/modules/tome/data/general/npcs/troll.lua b/game/modules/tome/data/general/npcs/troll.lua index 53cbf1003c..334a2ecfc2 100644 --- a/game/modules/tome/data/general/npcs/troll.lua +++ b/game/modules/tome/data/general/npcs/troll.lua @@ -100,6 +100,7 @@ newEntity{ base = "BASE_NPC_TROLL", mana_regen = 20, combat_armor = 8, combat_def = 4, autolevel = "warriormage", + resolvers.inscriptions(1, "rune"), resolvers.talents{ [Talents.T_STUN]=4, [Talents.T_KNOCKBACK]=3, [Talents.T_LIGHTNING]=4, diff --git a/game/modules/tome/data/general/npcs/vampire.lua b/game/modules/tome/data/general/npcs/vampire.lua index 7d0faa1aca..eed54f75a3 100644 --- a/game/modules/tome/data/general/npcs/vampire.lua +++ b/game/modules/tome/data/general/npcs/vampire.lua @@ -58,6 +58,8 @@ newEntity{ open_door = true, + resolvers.inscriptions(1, "rune"), + resolvers.tmasteries{ ["technique/other"]=0.5, ["spell/phantasm"]=0.8, }, resolvers.sustains_at_birth(), @@ -113,6 +115,7 @@ It can summon the very shades of its victims from beyond the grave to come ensla combat_armor = 12, combat_def = 10, rank = 3, ai = "dumb_talented_simple", ai_state = { talent_in=6, }, + resolvers.inscriptions(1, "rune"), summon = {{type="undead", number=1, hasxp=false}, }, resolvers.talents{ [Talents.T_STUN]=2, [Talents.T_SUMMON]=1, [Talents.T_BLUR_SIGHT]=3, [Talents.T_PHANTASMAL_SHIELD]=2, [Talents.T_ROTTING_DISEASE]=3, }, } @@ -126,6 +129,7 @@ newEntity{ base = "BASE_NPC_VAMPIRE", combat_armor = 15, combat_def = 15, rank = 3, ai = "dumb_talented_simple", ai_state = { talent_in=4, }, + resolvers.inscriptions(1, "rune"), summon = {{type="undead", number=1, hasxp=false}, }, resolvers.talents{ [Talents.T_STUN]=4, [Talents.T_SUMMON]=1, [Talents.T_BLUR_SIGHT]=4, [Talents.T_PHANTASMAL_SHIELD]=5, [Talents.T_ROTTING_DISEASE]=5, }, make_escort = { diff --git a/game/modules/tome/data/general/npcs/ziguranth.lua b/game/modules/tome/data/general/npcs/ziguranth.lua index 3c61c6d0fa..b7edd23780 100644 --- a/game/modules/tome/data/general/npcs/ziguranth.lua +++ b/game/modules/tome/data/general/npcs/ziguranth.lua @@ -41,6 +41,7 @@ newEntity{ open_door = true, resolvers.talents{ [Talents.T_HEAVY_ARMOUR_TRAINING]=1, }, + resolvers.inscriptions(1, "infusion"), autolevel = "warrior", ai = "dumb_talented_simple", ai_state = { ai_move="move_dmap", talent_in=3, }, diff --git a/game/modules/tome/data/zones/ruins-kor-pul/npcs.lua b/game/modules/tome/data/zones/ruins-kor-pul/npcs.lua index f2e9c65ae2..5b9539e8a9 100644 --- a/game/modules/tome/data/zones/ruins-kor-pul/npcs.lua +++ b/game/modules/tome/data/zones/ruins-kor-pul/npcs.lua @@ -57,7 +57,7 @@ newEntity{ define_as = "SHADE", [Talents.T_MANATHRUST]=4, [Talents.T_FREEZE]=4, [Talents.T_TIDAL_WAVE]=2, [Talents.T_WEAPONS_MASTERY]=3, }, - resolvers.inscriptions(1, {"shielding rune", "phase door rune", "regeneration infusion", "heroism infusion"}), + resolvers.inscriptions(1, {"shielding rune", "phase door rune"}), inc_damage = {all=-20}, autolevel = "warriormage", diff --git a/game/modules/tome/resolvers.lua b/game/modules/tome/resolvers.lua index fb21186ef5..a71acb731c 100644 --- a/game/modules/tome/resolvers.lua +++ b/game/modules/tome/resolvers.lua @@ -369,9 +369,18 @@ function resolvers.inscriptions(nb, list) end function resolvers.calc.inscriptions(t, e) for i = 1, t[1] do - local name = rng.tableRemove(t[2]) - if not name then return nil end - local o = game.zone:makeEntity(game.level, "object", {name=name}, nil, true) + local o + if type(t[2]) == "table" then + if #t[2] then + local name = rng.tableRemove(t[2]) + if not name then return nil end + o = game.zone:makeEntity(game.level, "object", {name=name}, nil, true) + else + o = game.zone:makeEntity(game.level, "object", {type="scroll"}, nil, true) + end + else + o = game.zone:makeEntity(game.level, "object", {type="scroll", subtype=t[2]}, nil, true) + end if o and o.inscription_talent and o.inscription_data then e:setInscription(nil, o.inscription_talent, o.inscription_data, false, false, nil, true) end -- GitLab