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

stuff


git-svn-id: http://svn.net-core.org/repos/t-engine4@123 51575b47-30f0-44d4-a5cc-537603b46e54
parent ec94caf8
No related branches found
No related tags found
No related merge requests found
......@@ -41,6 +41,15 @@ function _M:init(t)
self.image = self.image or nil
self.display = self.display or '.'
if self.color then
self.color_r = self.color.r
self.color_g = self.color.g
self.color_b = self.color.b
self.color_br = self.color.br
self.color_bg = self.color.bg
self.color_bb = self.color.bb
self.color = nil
end
self.color_r = self.color_r or 0
self.color_g = self.color_g or 0
self.color_b = self.color_b or 0
......
colors = {}
function defineColor(name, r, g, b, br, bg, bb)
colors[name] = {r=r, g=g, b=b, br=br, bg=bg, bb=bb}
end
-- load some utility functions
dofile("/engine/utils.lua")
dofile("/engine/colors.lua")
-- load resolver functions for entities cloning
dofile("/engine/resolvers.lua")
......
defineColor('WHITE', 0xFF, 0xFF, 0xFF)
defineColor('SLATE', 0x8C, 0x8C, 0x8C)
defineColor('ORANGE', 0xFF, 0x77, 0x00)
defineColor('RED', 0xC9, 0x00, 0x00)
defineColor('GREEN', 0x00, 0x86, 0x45)
defineColor('BLUE', 0x00, 0x00, 0xE3)
defineColor('UMBER', 0x8E, 0x45, 0x00)
defineColor('LIGHT_DARK', 0x50, 0x50, 0x50)
defineColor('LIGHT_SLATE', 0xD1, 0xD1, 0xD1)
defineColor('VIOLET', 0xC0, 0x00, 0xAF)
defineColor('YELLOW', 0xFF, 0xFF, 0x00)
defineColor('LIGHT_RED', 0xFF, 0x00, 0x68)
defineColor('LIGHT_GREEN', 0x00, 0xFF, 0x00)
defineColor('LIGHT_BLUE', 0x51, 0xDD, 0xFF)
defineColor('LIGHT_UMBER', 0xD7, 0x8E, 0x45)
defineColor('ROYAL_BLUE', 65, 105, 225)
defineColor('AQUAMARINE', 127, 255, 212)
defineColor('CADET_BLUE', 95, 158, 160)
defineColor('STEEL_BLUE', 70, 130, 180)
defineColor('TEAL', 0, 128, 128)
defineColor('LIGHT_STEEL_BLUE', 176, 196, 222)
defineColor('PINK', 255, 192, 203)
defineColor('GOLD', 255, 215, 0)
defineColor('FIREBRICK', 178, 34, 34)
defineColor('DARK_RED', 100, 0, 0)
defineColor('CRIMSON', 220, 20, 60)
defineColor('MOCCASIN', 255, 228, 181)
defineColor('KHAKI', 240, 230, 130)
defineColor('SANDY_BROWN', 244, 164, 96)
defineColor('SALMON', 250, 128, 114)
defineColor('DARK_ORCHID', 153, 50, 204)
defineColor('ORCHID', 218, 112, 214)
defineColor('PURPLE', 128, 0, 139)
defineColor('CHOCOLATE', 210, 105, 30)
defineColor('DARK_KHAKI', 189, 183, 107)
defineColor('TAN', 210, 180, 140)
defineColor('HONEYDEW', 240, 255, 240)
defineColor('ANTIQUE_WHITE', 250, 235, 215)
defineColor('OLD_LACE', 253, 245, 230)
defineColor('DARK_SLATE_GRAY', 47, 79, 79)
defineColor('OLIVE_DRAB', 107, 142, 35)
defineColor('DARK_SEA_GREEN', 143, 188, 143)
defineColor('YELLOW_GREEN', 154, 205, 50)
defineColor('DARK_GREEN', 50, 77, 12)
......@@ -61,8 +61,13 @@ newBirthDescriptor{
["spell/earth"]=true,
["spell/cold"]=true,
["spell/air"]=true,
["spell/conveyance"]=false,
["spell/nature"]=false,
["spell/mind"]=true,
["spell/temporal"]=true,
["spell/meta"]=true,
["spell/divination"]=true,
["spell/conveyance"]=true,
["spell/nature"]=true,
["spell/necromancy"]=true,
},
talents = {
ActorTalents.T_MANATHRUST,
......
newEntity{
define_as = "BASE_SWORD",
slot = "MAINHAND",
type = "weapon",
display = "/", color_r=255,
encumber = 3,
egos_chance = { },
egos = loadList("/data/general/egos.lua"),
}
newEntity{
base = "BASE_SWORD",
name = "& #1#longsword~#2#",
level_range = {1, 10},
rarity = 3,
combat = {
dam = resolvers.rngavg(7,11),
atk = 3,
apr = 2,
dammod = {str=1},
},
wielder = {
},
}
load("/data/general/swords.lua")
newEntity{
name = "& tower shield~",
......
newEntity{
define_as = "BASE_SWORD",
slot = "MAINHAND",
type = "weapon", subtype="sword",
display = "/", color=colors.SLATE,
encumber = 3,
desc = [[Sharp, long, and deadly.]],
}
newEntity{ base = "BASE_SWORD",
name = "rapier",
level_range = {1, 10},
rarity = 3,
combat = {
dam = resolvers.rngavg(7,11),
apr = 3,
dammod = {str=1},
},
}
newEntity{ base = "BASE_SWORD",
name = "rapier",
level_range = {1, 10},
rarity = 3,
combat = {
dam = resolvers.rngavg(10,20),
apr = 3,
dammod = {str=1},
},
}
......@@ -35,7 +35,7 @@ newEntity{
newEntity{
group = "icky things",
name = "white icky",
display = "i", color_r=255, color_g=255, color_b=255,
display = "i", color=colors.YELLOW,
level_range = {3, 7}, exp_worth = 100,
rarity = 1,
autolevel = "warrior",
......
......@@ -12,10 +12,10 @@ function _M:init(actor)
self.talentsel = 1
self:keyCommands{
_UP = function() self.talentsel = util.boundWrap(self.talentsel - 1, 1, #self.list) end,
_DOWN = function() self.talentsel = util.boundWrap(self.talentsel + 1, 1, #self.list) end,
_LEFT = function() self:learn(false) end,
_RIGHT = function() self:learn(true) end,
_UP = function() self.talentsel = util.boundWrap(self.talentsel - 1, 1, #self.list) self.changed = true end,
_DOWN = function() self.talentsel = util.boundWrap(self.talentsel + 1, 1, #self.list) self.changed = true end,
_LEFT = function() self:learn(false) self.changed = true end,
_RIGHT = function() self:learn(true) self.changed = true end,
_ESCAPE = function() game:unregisterDialog(self) end,
}
self:mouseZones{
......@@ -24,6 +24,7 @@ function _M:init(actor)
if button == "left" then self:learn(true)
elseif button == "right" then self:learn(false)
end
self.changed = true
end },
}
end
......@@ -79,7 +80,7 @@ function _M:learnTalent(t_id, v)
self:simplePopup("Not enough talent points", "You have no talent points left!")
return
end
if not self.actor:canLearnTalent(t_id) then
if not self.actor:canLearnTalent(t) then
self:simplePopup("Cannot learn talent", "Prerequisites not met!")
return
end
......@@ -195,4 +196,6 @@ Mouse: #00FF00#Left click#FFFFFF# to learn; #00FF00#right click#FFFFFF# to unlea
self:drawSelectionList(s, 2, 45, self.font_h, self.list, self.talentsel, "name")
self:drawSelectionList(s, 300, 45, self.font_h, self.list_known, self.talentsel)
self.changed = false
end
......@@ -8,6 +8,9 @@ local ActorAI = require "engine.interface.ActorAI"
local ActorInventory = require "engine.interface.ActorInventory"
local Birther = require "engine.Birther"
-- Some default colors
dofile("/mod/colors.lua")
-- Damage types
DamageType:loadDefinition("/data/damage_types.lua")
-- Talents
......
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