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

Added a new rank between elite & boss for creatutes: unique

Added a new random unique creature


git-svn-id: http://svn.net-core.org/repos/t-engine4@1809 51575b47-30f0-44d4-a5cc-537603b46e54
parent a5626c6d
No related branches found
No related tags found
No related merge requests found
...@@ -248,6 +248,8 @@ function _M:act() ...@@ -248,6 +248,8 @@ function _M:act()
-- Ok reset the seen cache -- Ok reset the seen cache
self:resetCanSeeCache() self:resetCanSeeCache()
if self.on_act then self:on_act() end
return true return true
end end
...@@ -406,6 +408,7 @@ function _M:getRankStatAdjust() ...@@ -406,6 +408,7 @@ function _M:getRankStatAdjust()
if self.rank == 1 then return -1 if self.rank == 1 then return -1
elseif self.rank == 2 then return -0.5 elseif self.rank == 2 then return -0.5
elseif self.rank == 3 then return 0 elseif self.rank == 3 then return 0
elseif self.rank == 3.5 then return 1
elseif self.rank == 4 then return 1 elseif self.rank == 4 then return 1
elseif self.rank >= 5 then return 1 elseif self.rank >= 5 then return 1
else return 0 else return 0
...@@ -416,6 +419,7 @@ function _M:getRankLevelAdjust() ...@@ -416,6 +419,7 @@ function _M:getRankLevelAdjust()
if self.rank == 1 then return -1 if self.rank == 1 then return -1
elseif self.rank == 2 then return 0 elseif self.rank == 2 then return 0
elseif self.rank == 3 then return 1 elseif self.rank == 3 then return 1
elseif self.rank == 3.5 then return 2
elseif self.rank == 4 then return 3 elseif self.rank == 4 then return 3
elseif self.rank >= 5 then return 4 elseif self.rank >= 5 then return 4
else return 0 else return 0
...@@ -427,6 +431,7 @@ function _M:getRankLifeAdjust(value) ...@@ -427,6 +431,7 @@ function _M:getRankLifeAdjust(value)
if self.rank == 1 then return value * (level_adjust - 0.2) if self.rank == 1 then return value * (level_adjust - 0.2)
elseif self.rank == 2 then return value * (level_adjust - 0.1) elseif self.rank == 2 then return value * (level_adjust - 0.1)
elseif self.rank == 3 then return value * (level_adjust + 0.1) elseif self.rank == 3 then return value * (level_adjust + 0.1)
elseif self.rank == 3.5 then return value * (level_adjust + 0.3)
elseif self.rank == 4 then return value * (level_adjust + 0.3) elseif self.rank == 4 then return value * (level_adjust + 0.3)
elseif self.rank >= 5 then return value * (level_adjust + 0.5) elseif self.rank >= 5 then return value * (level_adjust + 0.5)
else return 0 else return 0
...@@ -437,6 +442,7 @@ function _M:getRankResistAdjust() ...@@ -437,6 +442,7 @@ function _M:getRankResistAdjust()
if self.rank == 1 then return 0.4, 0.9 if self.rank == 1 then return 0.4, 0.9
elseif self.rank == 2 then return 0.5, 1.5 elseif self.rank == 2 then return 0.5, 1.5
elseif self.rank == 3 then return 0.8, 1.5 elseif self.rank == 3 then return 0.8, 1.5
elseif self.rank == 3.5 then return 0.9, 1.5
elseif self.rank == 4 then return 0.9, 1.5 elseif self.rank == 4 then return 0.9, 1.5
elseif self.rank >= 5 then return 0.9, 1.5 elseif self.rank >= 5 then return 0.9, 1.5
else return 0 else return 0
...@@ -448,6 +454,7 @@ function _M:TextRank() ...@@ -448,6 +454,7 @@ function _M:TextRank()
if self.rank == 1 then rank, color = "critter", "#C0C0C0#" if self.rank == 1 then rank, color = "critter", "#C0C0C0#"
elseif self.rank == 2 then rank, color = "normal", "#ANTIQUE_WHITE#" elseif self.rank == 2 then rank, color = "normal", "#ANTIQUE_WHITE#"
elseif self.rank == 3 then rank, color = "elite", "#YELLOW#" elseif self.rank == 3 then rank, color = "elite", "#YELLOW#"
elseif self.rank == 3.5 then rank, color = "unique", "#SANDY_BROWN#"
elseif self.rank == 4 then rank, color = "boss", "#ORANGE#" elseif self.rank == 4 then rank, color = "boss", "#ORANGE#"
elseif self.rank >= 5 then rank, color = "elite boss", "#GOLD#" elseif self.rank >= 5 then rank, color = "elite boss", "#GOLD#"
end end
...@@ -795,14 +802,14 @@ function _M:die(src) ...@@ -795,14 +802,14 @@ function _M:die(src)
hateMessage = "#F53CBE#You have taken the life of an experienced foe!" hateMessage = "#F53CBE#You have taken the life of an experienced foe!"
end end
if self.rank == 3 then if self.rank >= 4 then
-- elite bonus
hateGain = hateGain * 2
hateMessage = "#F53CBE#An elite foe has fallen to your hate!"
elseif self.rank >= 4 then
-- boss bonus -- boss bonus
hateGain = hateGain * 4 hateGain = hateGain * 4
hateMessage = "#F53CBE#Your hate has conquered a great adversary!" hateMessage = "#F53CBE#Your hate has conquered a great adversary!"
elseif self.rank >= 3 then
-- elite bonus
hateGain = hateGain * 2
hateMessage = "#F53CBE#An elite foe has fallen to your hate!"
end end
hateGain = math.min(hateGain, 10) hateGain = math.min(hateGain, 10)
...@@ -1490,6 +1497,7 @@ function _M:worthExp(target) ...@@ -1490,6 +1497,7 @@ function _M:worthExp(target)
if self.rank == 1 then mult = 0.6 if self.rank == 1 then mult = 0.6
elseif self.rank == 2 then mult = 0.8 elseif self.rank == 2 then mult = 0.8
elseif self.rank == 3 then mult = 3 elseif self.rank == 3 then mult = 3
elseif self.rank == 3.5 then mult = 15
elseif self.rank == 4 then mult = 60 elseif self.rank == 4 then mult = 60
elseif self.rank >= 5 then mult = 120 elseif self.rank >= 5 then mult = 120
end end
...@@ -1500,6 +1508,7 @@ function _M:worthExp(target) ...@@ -1500,6 +1508,7 @@ function _M:worthExp(target)
if self.rank == 1 then mult = 2 if self.rank == 1 then mult = 2
elseif self.rank == 2 then mult = 2 elseif self.rank == 2 then mult = 2
elseif self.rank == 3 then mult = 3.5 elseif self.rank == 3 then mult = 3.5
elseif self.rank == 3.5 then mult = 5
elseif self.rank == 4 then mult = 6 elseif self.rank == 4 then mult = 6
elseif self.rank >= 5 then mult = 6.5 elseif self.rank >= 5 then mult = 6.5
end end
...@@ -1644,6 +1653,7 @@ function _M:updateEffectDuration(dur, what) ...@@ -1644,6 +1653,7 @@ function _M:updateEffectDuration(dur, what)
-- Rank reduction: below elite = none; elite = 1, boss = 2, elite boss = 3 -- Rank reduction: below elite = none; elite = 1, boss = 2, elite boss = 3
local rankmod = 0 local rankmod = 0
if self.rank == 3 then rankmod = 25 if self.rank == 3 then rankmod = 25
elseif self.rank == 3.5 then rankmod = 40
elseif self.rank == 4 then rankmod = 45 elseif self.rank == 4 then rankmod = 45
elseif self.rank == 5 then rankmod = 75 elseif self.rank == 5 then rankmod = 75
end end
......
...@@ -670,24 +670,8 @@ function _M:setupCommands() ...@@ -670,24 +670,8 @@ function _M:setupCommands()
end, end,
[{"_g","ctrl"}] = function() [{"_g","ctrl"}] = function()
if config.settings.tome.cheat then if config.settings.tome.cheat then
--[[ local m = game.zone:makeEntityByName(game.level, "actor", "TEST")
local a = mod.class.NPC.new{} game.zone:addEntity(game.level, m, "actor", game.player.x, game.player.y+1)
a:replaceWith(self.player:cloneFull())
mod.class.NPC.castAs(a)
engine.interface.ActorAI.init(a, a)
a.no_drops = true
a.energy.value = 0
a.player = nil
a.rank = 4
a.name = "Shadow of "..a.name
a.color_r = 150 a.color_g = 150 a.color_b = 150
a._mo:invalidate()
a.ai = "dumb_talented_simple"
a.ai_state = {talent_in=1}
a.faction = "enemies"
self.zone:addEntity(self.level, a, "actor", self.player.x+1, self.player.y)
--]]
self:changeLevel(1, "ruined-dungeon")
end end
end, end,
} }
......
...@@ -157,7 +157,7 @@ newEntity{ base = "BASE_NPC_ANT", ...@@ -157,7 +157,7 @@ newEntity{ base = "BASE_NPC_ANT",
name = "Queen Ant", color=colors.VIOLET, unique=true, name = "Queen Ant", color=colors.VIOLET, unique=true,
desc = "Queen of the ants, queen of the biting death!", desc = "Queen of the ants, queen of the biting death!",
level_range = {25, nil}, exp_worth = 2, level_range = {25, nil}, exp_worth = 2,
rank = 4, rank = 3.5,
size_category = 3, size_category = 3,
rarity = 50, rarity = 50,
max_life = 230, life_rating=12, max_life = 230, life_rating=12,
......
...@@ -62,7 +62,7 @@ newEntity{ base = "BASE_NPC_AQUATIC_DEMON", ...@@ -62,7 +62,7 @@ newEntity{ base = "BASE_NPC_AQUATIC_DEMON",
desc = "Walrog, the lord of Water", desc = "Walrog, the lord of Water",
level_range = {20, 30}, exp_worth = 1, level_range = {20, 30}, exp_worth = 1,
rarity = 50, rarity = 50,
rank = 4, rank = 3.5,
life_rating = 16, life_rating = 16,
autolevel = "warriormage", autolevel = "warriormage",
combat_armor = 45, combat_def = 0, combat_armor = 45, combat_def = 0,
......
...@@ -51,7 +51,7 @@ newEntity{ base="BASE_NPC_BIRD", define_as = "NPC_PHOENIX", ...@@ -51,7 +51,7 @@ newEntity{ base="BASE_NPC_BIRD", define_as = "NPC_PHOENIX",
max_mana = 1000, max_mana = 1000,
mana_regen = 20, mana_regen = 20,
life_regen = -15, life_regen = -15,
rank = 4, rank = 3.5,
no_breath = 1, no_breath = 1,
size_category = 3, size_category = 3,
......
...@@ -110,7 +110,7 @@ newEntity{ base = "BASE_NPC_CANINE", ...@@ -110,7 +110,7 @@ newEntity{ base = "BASE_NPC_CANINE",
name = "Rungof the Warg Titan", color=colors.VIOLET, unique=true, image="npc/canine_rungof.png", name = "Rungof the Warg Titan", color=colors.VIOLET, unique=true, image="npc/canine_rungof.png",
desc = [[It is a large wolf with eyes full of cunning, only 3 times bigger than a normal warg.]], desc = [[It is a large wolf with eyes full of cunning, only 3 times bigger than a normal warg.]],
level_range = {20, nil}, exp_worth = 2, level_range = {20, nil}, exp_worth = 2,
rank = 4, rank = 3.5,
size_category = 4, size_category = 4,
rarity = 50, rarity = 50,
max_life = 220, max_life = 220,
......
...@@ -96,7 +96,7 @@ newEntity{ base = "BASE_NPC_MULTIHUED_DRAKE", ...@@ -96,7 +96,7 @@ newEntity{ base = "BASE_NPC_MULTIHUED_DRAKE",
} }
newEntity{ base = "BASE_NPC_MULTIHUED_DRAKE", newEntity{ base = "BASE_NPC_MULTIHUED_DRAKE",
name = "greater multi-hued wyrm", color=colors.VIOLET, display="D", name = "greater multi-hued wyrm", color=colors.PURPLE, display="D",
desc = [[An old and powerful multi-hued drake, armed with many deadly breath weapons and nasty claws.]], desc = [[An old and powerful multi-hued drake, armed with many deadly breath weapons and nasty claws.]],
level_range = {35, nil}, exp_worth = 1, level_range = {35, nil}, exp_worth = 1,
rarity = 8, rarity = 8,
...@@ -130,3 +130,71 @@ newEntity{ base = "BASE_NPC_MULTIHUED_DRAKE", ...@@ -130,3 +130,71 @@ newEntity{ base = "BASE_NPC_MULTIHUED_DRAKE",
[Talents.T_ACID_BREATH]=13, [Talents.T_ACID_BREATH]=13,
}, },
} }
newEntity{ base = "BASE_NPC_MULTIHUED_DRAKE", define_as="TEST",
unique = true,
name = "Ureslak the Prismatic", color=colors.VIOLET, display="D",
desc = [[A huge multi-hued drake. It seems to shift color rapidly.]],
level_range = {35, nil}, exp_worth = 2,
rarity = 50,
rank = 3.5,
max_life = resolvers.rngavg(320,350),
combat_armor = 33, combat_def = 40,
on_melee_hit = {[DamageType.FIRE]=resolvers.mbonus(10, 5), [DamageType.COLD]=resolvers.mbonus(10, 5), [DamageType.LIGHTNING]=resolvers.mbonus(10, 5), [DamageType.ACID]=resolvers.mbonus(10, 5)},
combat = { dam=resolvers.rngavg(35,150), atk=resolvers.rngavg(25,130), apr=32, dammod={str=1.1} },
no_auto_resists = true,
color_switch = 2,
resists = { all=50, [DamageType.FIRE] = 100, [DamageType.COLD] = -100 },
resolvers.talents{ [Talents.T_FIRE_BREATH]=15, [Talents.T_FLAME]=7 },
stats = { str=20, dex=20, mag=80, con=16 },
talent_cd_reduction={[Talents.T_MANATHRUST]=4},
colors = {
{"red", {
resists = { all=50, [DamageType.FIRE] = 100, [DamageType.COLD] = -100 },
talents = { [Talents.T_EQUILIBRIUM_POOL]=1, [Talents.T_MANA_POOL]=1, [Talents.T_FIRE_BREATH]=15, [Talents.T_FLAME]=7 },
}},
{"white", {
resists = { all=50, [DamageType.COLD] = 100, [DamageType.FIRE] = -100 },
talents = { [Talents.T_EQUILIBRIUM_POOL]=1, [Talents.T_MANA_POOL]=1, [Talents.T_ICE_BREATH]=15, [Talents.T_ICE_SHARDS]=7 },
}},
{"blue", {
resists = { all=50, [DamageType.LIGHTNING] = 100, [DamageType.PHYSICAL] = -100 },
talents = { [Talents.T_EQUILIBRIUM_POOL]=1, [Talents.T_MANA_POOL]=1, [Talents.T_LIGHTNING_BREATH]=15, [Talents.T_SHOCK]=7 },
}},
{"green", {
resists = { all=50, [DamageType.NATURE] = 100, [DamageType.BLIGHT] = -100 },
talents = { [Talents.T_EQUILIBRIUM_POOL]=1, [Talents.T_MANA_POOL]=1, [Talents.T_POISON_BREATH]=15, [Talents.T_SPIT_POISON]=7 },
}},
{"dark", {
resists = { all=50, [DamageType.DARKNESS] = 100, [DamageType.LIGHT] = -100 },
talents = { [Talents.T_NEGATIVE_POOL]=1, [Talents.T_STARFALL]=7, [Talents.T_MOONLIGHT_RAY]=7 },
}},
{"violet", {
resists = { all=-50 },
talents = { [Talents.T_MANA_POOL]=1, [Talents.T_MANATHRUST]=12 },
}},
},
on_act = function(self)
self.color_switch = self.color_switch - 1
if self.color_switch <= 0 then
self.color_switch = 2
-- Reset cooldowns
self.talents_cd = {}
self:incEquilibrium(-100)
self:incMana(100)
self:incNegative(100)
-- Assign talents & resists
local t = rng.table(self.colors)
self.resists = t[2].resists
self.talents = t[2].talents
self.changed = true
game.logSeen(self, "#YELLOW#%s's skin turns %s!", self.name:capitalize(), t[1])
end
end,
}
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