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

new calendar

git-svn-id: http://svn.net-core.org/repos/t-engine4@1755 51575b47-30f0-44d4-a5cc-537603b46e54
parent bb1215ca
No related branches found
No related tags found
No related merge requests found
......@@ -33,7 +33,7 @@ DAY_START = HOUR * 6
--- Create a calendar
-- @param definition the file to load that returns a table containing calendar months
-- @param datestring a string to format the date when requested, in the format "%s %s %s %d %d", standing for, day, month, year, hour, minute
function _M:init(definition, datestring, start_year)
function _M:init(definition, datestring, start_year, start_day)
local data = dofile(definition)
self.calendar = {}
local days = 0
......@@ -46,6 +46,7 @@ function _M:init(definition, datestring, start_year)
self.datestring = datestring
self.start_year = start_year
self.start_day = start_day or 1
end
function _M:getTimeDate(turn)
......@@ -56,7 +57,7 @@ end
function _M:getDayOfYear(turn)
local d, y
d = math.floor(turn / self.DAY)
d = math.floor(turn / self.DAY) + (self.start_day - 1)
y = math.floor(d / 365)
d = math.floor(d % 365)
return d, self.start_year + y
......
......@@ -86,7 +86,7 @@ function _M:run()
self.player_display = PlayerDisplay.new(0, 220, 200, self.h * 0.8 - 220, {30,30,0})
self.hotkeys_display = HotkeysDisplay.new(nil, self.w * 0.5, self.h * 0.8, self.w * 0.5, self.h * 0.2, "/data/gfx/ui/talents-list.png")
self.npcs_display = ActorsSeenDisplay.new(nil, self.w * 0.5, self.h * 0.8, self.w * 0.5, self.h * 0.2, "/data/gfx/ui/talents-list.png")
self.calendar = Calendar.new("/data/calendar_rivendell.lua", "Today is the %s %s of the %s year of the Age of Ascendancy of Maj'Eyal.\nThe time is %02d:%02d.", 122)
self.calendar = Calendar.new("/data/calendar_rivendell.lua", "Today is the %s %s of the %s year of the Age of Ascendancy of Maj'Eyal.\nThe time is %02d:%02d.", 122, 167)
self.tooltip = Tooltip.new(nil, nil, {255,255,255}, {30,30,30})
self.flyers = FlyingText.new()
self:setFlyingText(self.flyers)
......
......@@ -34,6 +34,7 @@ newBirthDescriptor{
Cryomancer = function() return profile.mod.allow_build.mage_cryomancer and "allow" or "disallow" end,
Tempest = function() return profile.mod.allow_build.mage_tempest and "allow" or "disallow" end,
Geomancer = function() return profile.mod.allow_build.mage_geomancer and "allow" or "disallow" end,
Maelstrom = function() return profile.mod.allow_build.mage_maelstrom and "allow" or "disallow" end,
},
},
copy = {
......@@ -370,3 +371,52 @@ newBirthDescriptor{
},
},
}
newBirthDescriptor{
type = "subclass",
name = "Maelstrom",
desc = {
"A Maelstrom is an archmage specialized in elemental magic.",
"They gain access to all special elemental talents but have a restricted selection of other spells.",
"Most archmagi lack basic skills that others take for granted (like general fighting sense), but they make up for it by their raw magical power.",
"All archmagi have been trained in the secret town of Angolwen and posses a unique spell to teleport to it directly.",
"Their most important stats are: Magic and Willpower",
"#GOLD#Stats modifiers:",
"#LIGHT_BLUE# * +0 Strength, +0 Dexterity, +0 Constitution",
"#LIGHT_BLUE# * +5 Magic, +3 Willpower, +1 Cunning",
},
stats = { mag=5, wil=3, cun=1, },
talents_types = {
["spell/fire"]={true, 0.3},
["spell/wildfire"]={true, 0.3},
["spell/air"]={true, 0.3},
["spell/storm"]={true, 0.3},
["spell/earth"]={true, 0.3},
["spell/stone"]={true, 0.3},
["spell/water"]={true, 0.3},
["spell/ice"]={true, 0.3},
["spell/conveyance"]={true, 0},
["cunning/survival"]={false, -0.1},
},
talents = {
[ActorTalents.T_ICE_SHARDS] = 1,
[ActorTalents.T_FLAME] = 1,
[ActorTalents.T_STALACTITIC_MISSILES] = 1,
[ActorTalents.T_NOVA] = 1,
[ActorTalents.T_TELEPORT_ANGOLWEN]=1,
},
copy = {
-- All mages are of angolwen faction
faction = "angolwen",
max_life = 90,
life_rating = -4,
resolvers.equip{ id=true,
{type="weapon", subtype="staff", name="elm staff", autoreq=true},
{type="armor", subtype="cloth", name="linen robe", autoreq=true},
},
resolvers.inventory{ id=true,
{type="potion", subtype="potion", name="potion of lesser mana", ego_chance=-1000},
{type="potion", subtype="potion", name="potion of lesser mana", ego_chance=-1000},
},
},
}
......@@ -18,13 +18,14 @@
-- darkgod@te4.org
return {
{ 1, "Yestarë", },
{ 54, "Tuilë" },
{ 72, "Lairë" },
{ 54, "Yávië" },
{ 3, "Enderi" },
{ 54, "Quellë" },
{ 72, "Hrívë" },
{ 54, "Coirë" },
{ 1, "Mettarë" },
{ 2, "Wintertide", },
{ 10, "Allure" },
{ 80, "Regrowth" },
{ 80, "Pyre" },
{ 10, "Mirth" },
{ 3, "Summertide" },
{ 10, "Flare" },
{ 80, "Dusk" },
{ 80, "Haze" },
{ 10, "Decay" },
}
No preview for this file type
No preview for this file type
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