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

stone wardens (WIP)

new tiles


git-svn-id: http://svn.net-core.org/repos/t-engine4@3267 51575b47-30f0-44d4-a5cc-537603b46e54
parent 28bd6829
No related branches found
No related tags found
No related merge requests found
Showing
with 186 additions and 32 deletions
......@@ -87,6 +87,7 @@ function _M:init(title, actor, order, at_end, quickbirth, w, h)
Dialog.init(self, title and title or ("Character Creation: "..actor.name), w or 600, h or 400)
self.descriptors = {}
self.descriptors_by_type = {}
self.c_tut = Textzone.new{width=math.floor(self.iw / 2 - 10), height=1, auto_height=true, no_color_bleed=true, text=[[
Keyboard: #00FF00#up key/down key#FFFFFF# to select an option; #00FF00#Enter#FFFFFF# to accept; #00FF00#Backspace#FFFFFF# to go back.
......@@ -183,7 +184,7 @@ function _M:selectType(type)
print("[BIRTHER] checking allowance for ", d.name)
for j, od in ipairs(self.descriptors) do
if od.descriptor_choices and od.descriptor_choices[type] then
local what = util.getval(od.descriptor_choices[type][d.name]) or util.getval(od.descriptor_choices[type].__ALL__)
local what = util.getval(od.descriptor_choices[type][d.name], self) or util.getval(od.descriptor_choices[type].__ALL__, self)
if what and what == "allow" then
allowed = true
elseif what and (what == "never" or what == "disallow") then
......@@ -235,6 +236,7 @@ function _M:prev()
end
if not self.list then return end
self.changed = true
self.descriptors_by_type[self.current_type] = nil
table.remove(self.descriptors)
self.cur_order = self.cur_order - 1
self:selectType(self.order[self.cur_order])
......@@ -248,6 +250,7 @@ end
function _M:next()
self.changed = true
if self.list then
self.descriptors_by_type[self.current_type] = self.list[self.sel] or "none"
table.insert(self.descriptors, self.list[self.sel] or "none")
if self.list[self.sel] and self.list[self.sel].on_select then self.list[self.sel]:on_select() end
......
......@@ -246,6 +246,10 @@ function _M:actTurn()
local t = self:getTalentFromId(self.T_THUNDERSTORM)
t.do_storm(self, t)
end
if self:isTalentActive(self.T_STONE_VINES) then
local t = self:getTalentFromId(self.T_STONE_VINES)
t.do_vines(self, t)
end
if self:isTalentActive(self.T_BODY_OF_FIRE) then
local t = self:getTalentFromId(self.T_BODY_OF_FIRE)
t.do_fire(self, t)
......
......@@ -127,14 +127,16 @@ function _M:attackTarget(target, damtype, mult, noenergy)
if self:getInven(self.INVEN_OFFHAND) then
local offmult = self:getOffHandMult(mult)
for i, o in ipairs(self:getInven(self.INVEN_OFFHAND)) do
if o.combat and not o.archery then
local combat = o.combat
if o.special_combat and o.subtype == "shield" and self:knowTalent(self.T_STONESHIELD) then combat = o.special_combat end
if combat and not o.archery then
print("[ATTACK] attacking with", o.name)
local s, h = self:attackTargetWith(target, o.combat, damtype, offmult)
local s, h = self:attackTargetWith(target, combat, damtype, offmult)
speed = math.max(speed or 0, s)
hit = hit or h
if hit and not sound then sound = o.combat.sound
elseif not hit and not sound_miss then sound_miss = o.combat.sound_miss end
if not o.combat.no_stealth_break then break_stealth = true end
if hit and not sound then sound = combat.sound
elseif not hit and not sound_miss then sound_miss = combat.sound_miss end
if not combat.no_stealth_break then break_stealth = true end
end
end
end
......@@ -400,6 +402,13 @@ function _M:attackTargetWith(target, weapon, damtype, mult)
if hitted and not target.dead and target:attr("mana_regen_on_hit") then target:incMana(target.mana_regen_on_hit) end
if hitted and not target.dead and target:attr("equilibrium_regen_on_hit") then target:incEquilibrium(-target.equilibrium_regen_on_hit) end
if hitted and not target.dead and target:knowTalent(target.T_STONESHIELD) then
local t = target:getTalentFromId(target.T_STONESHIELD)
local m, mm, e, em = t.getValues(self, t)
target:incMana(math.min(dam * m, mm))
target:incEquilibrium(-math.min(dam * e, em))
end
-- Ablative Armor
if hitted and not target.dead and target:attr("carbon_spikes") then
if target.carbon_armor >= 1 then
......
......@@ -31,6 +31,7 @@ newBirthDescriptor{
__ALL__ = "disallow",
Summoner = function() return profile.mod.allow_build.wilder_summoner and "allow" or "disallow" end,
Wyrmic = function() return profile.mod.allow_build.wilder_wyrmic and "allow" or "disallow" end,
["Stone Warden"] = function(birth) return birth.descriptors_by_type.race and birth.descriptors_by_type.race.name == "Dwarf" and profile.mod.allow_build.wilder_stone_warden and "allow" or "disallow" end,
},
},
copy = {
......@@ -121,33 +122,37 @@ newBirthDescriptor{
type = "subclass",
name = "Stone Warden",
desc = {
"",
"Stone Wardens are dwarves trained in both the eldritch arts and the worship of nature.",
"While other races are stuck in their belief that arcane forces and natural forces are meant to oppose, dwarves have found a way to combine them in harmony.",
"Stone Wardens are armoured fighters, using a shield to channel many of their powers.",
"#GOLD#Stat modifiers:",
"#LIGHT_BLUE# * +3 Strength, +0 Dexterity, +0 Constitution",
"#LIGHT_BLUE# * +3 Magic, +3 Willpower, +0 Cunning",
"#LIGHT_BLUE# * +2 Strength, +0 Dexterity, +0 Constitution",
"#LIGHT_BLUE# * +4 Magic, +3 Willpower, +0 Cunning",
},
stats = { str=3, wil=3, mag=3, },
stats = { str=2, wil=3, mag=4, },
talents_types = {
["wild-gift/call"]={true, 0.2},
["wild-gift/stone-mastery"]={true, 0.3},
["spell/earth"]={true, 0.3},
["spell/stone"]={true, 0.3},
["cunning/survival"]={false, 0},
["technique/shield-offense"]={true, 0.1},
["technique/combat-techniques-passive"]={true, 0},
["wild-gift/earthen-stone"]={true, 0.3},
["wild-gift/earthen-vines"]={true, 0.3},
["spell/arcane-shield"]={true, 0.3},
["spell/earth"]={true, 0.2},
["spell/stone"]={false, 0.2},
["cunning/survival"]={true, 0},
["technique/combat-training"]={true, 0},
},
talents = {
[ActorTalents.T_ICE_CLAW] = 1,
[ActorTalents.T_MEDITATION] = 1,
[ActorTalents.T_STONE_VINES] = 1,
[ActorTalents.T_STONESHIELD] = 1,
[ActorTalents.T_ELDRITCH_BLOW] = 1,
[ActorTalents.T_ARMOUR_TRAINING] = 3,
[ActorTalents.T_WEAPONS_MASTERY] = 1,
[ActorTalents.T_WEAPON_COMBAT] = 1,
},
copy = {
max_life = 110,
resolvers.equip{ id=true,
{type="weapon", subtype="battleaxe", name="iron battleaxe", autoreq=true, ego_chance=-1000},
{type="armor", subtype="light", name="rough leather armour", autoreq=true, ego_chance=-1000}
{type="weapon", subtype="mace", name="iron mace", autoreq=true, ego_chance=-1000, ego_chance=-1000},
{type="armor", subtype="shield", name="iron shield", autoreq=true, ego_chance=-1000, ego_chance=-1000},
{type="armor", subtype="heavy", name="iron mail armour", autoreq=true, ego_chance=-1000, ego_chance=-1000}
},
},
copy_add = {
......
......@@ -19,6 +19,7 @@
local default_eyal_descriptors = function(add)
local base = {
race =
{
__ALL__ = "disallow",
......
......@@ -88,6 +88,10 @@ setDefaultProjector(function(src, x, y, type, dam, tmp, no_martyr)
dam = t.css_on_damage(target, t, type, dam)
end
if type ~= DamageType.PHYSICAL and target.knowTalent and target:knowTalent(target.T_STONE_FORTRESS) and target:hasEffect(target.EFF_DWARVEN_RESILIENCE) then
dam = math.max(0, dam - target:combatArmor() * (50 + target:getTalentLevel(target.T_STONE_FORTRESS) * 10) / 100)
end
-- Reduce damage with resistance
if target.resists then
local pen = 0
......
......@@ -92,7 +92,7 @@ newEntity{
type="ambush",
width=14,
height=14,
nb={2, 4},
nb={2, 3},
filters={{special_rarity="humanoid_random_boss", random_boss={
nb_classes=1,
rank=3,
......
......@@ -75,7 +75,7 @@ newEntity{ base = "BASE_NPC_AQUATIC_CRITTER",
newEntity{ base = "BASE_NPC_AQUATIC_CRITTER",
name = "ancient dragon turtle", color=colors.DARK_SEA_GREEN,
desc = "A snake-like being, radiating electricity.",
desc = "A huge, elongated sea-green reptile, it looks old and impenetrable.",
level_range = {20, nil}, exp_worth = 1,
rarity = 10,
rank = 3,
......
......@@ -62,6 +62,7 @@ newEntity{ base = "BASE_NPC_BONE_GIANT",
name = "bone giant", color=colors.WHITE,
desc = [[A towering creature, made from the bones of dozens of dead bodies. It is covered by an unholy aura.]],
level_range = {25, nil}, exp_worth = 1,
resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/undead_giant_bone_giant.png", display_h=2, display_y=-1}}},
rarity = 1,
max_life = resolvers.rngavg(100,120),
combat_armor = 20, combat_def = 0,
......
......@@ -54,7 +54,7 @@ newEntity{
}
newEntity{ base = "BASE_NPC_CONSTRUCT",
name = "broken golem", color=colors.LIGHT_UMBER, image = "npc/summoner_golem.png",
name = "broken golem", color=colors.LIGHT_UMBER,
desc = [[This golem is badly damaged.]],
level_range = {6, nil}, exp_worth = 1,
rarity = 1,
......
......@@ -54,7 +54,7 @@ newEntity{ base = "BASE_NPC_HUMANOID_RANDOM_BOSS",
}
newEntity{ base = "BASE_NPC_HUMANOID_RANDOM_BOSS",
name = "halflint", subtype = "halfling", color=colors.BLUE,
name = "halfling", subtype = "halfling", color=colors.BLUE,
humanoid_random_boss = 1,
resolvers.racial(),
}
......
-- ToME - Tales of Maj'Eyal
-- Copyright (C) 2009, 2010, 2011 Nicolas Casalini
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
--
-- Nicolas Casalini "DarkGod"
-- darkgod@te4.org
-- Make the 2 main forks
local nb = 0
local forks = {{}, {}}
local m1 = forks[1]
local m2 = forks[2]
local tiles = math.ceil(math.sqrt(tx*tx+ty*ty))
local tx = tx * engine.Map.tile_w
local ty = ty * engine.Map.tile_h
local breakdir = math.rad(rng.range(-8, 8))
m1.bx = 0
m1.by = 0
m1.thick = 5
m1.dir = math.atan2(ty, tx) + breakdir
m1.size = math.sqrt(tx*tx+ty*ty) / 2
m2.bx = m1.size * math.cos(m1.dir)
m2.by = m1.size * math.sin(m1.dir)
m2.thick = 5
m2.dir = math.atan2(ty, tx) - breakdir
m2.size = math.sqrt(tx*tx+ty*ty) / 2
-- Add more forks
for i = 1, math.min(math.max(3, m1.size / 5), 20) do
local m = rng.percent(50) and forks[1] or forks[2]
if rng.percent(60) then m = rng.table(forks) end
local f = {}
f.thick = 2
f.dir = m.dir + math.rad(rng.range(-30,30))
f.size = rng.range(6, 25)
local br = rng.range(1, m.size)
f.bx = br * math.cos(m.dir) + m.bx
f.by = br * math.sin(m.dir) + m.by
forks[#forks+1] = f
end
-- Populate the lightning based on the forks
return { generator = function()
local f = rng.table(forks)
local a = f.dir
local rad = rng.range(-3,3)
local ra = math.rad(rad)
local r = rng.range(1, f.size)
return {
life = life or 4,
size = f.thick, sizev = 0, sizea = 0,
x = r * math.cos(a) + 3 * math.cos(ra) + f.bx, xv = 0, xa = 0,
y = r * math.sin(a) + 3 * math.sin(ra) + f.by, yv = 0, ya = 0,
dir = 0, dirv = 0, dira = 0,
vel = 0, velv = 0, vela = 0,
r = 0xD7/255, rv = 0, ra = 0,
g = 0x8E/255, gv = 0, ga = 0,
b = 0x45/255, bv = 0, ba = 0,
a = rng.range(230, 255)/255, av = 0, aa = 0,
}
end, },
function(self)
if nb < 4 then self.ps:emit(20*tiles) nb = nb + 1 end
end,
4*(20)*tiles
-- ToME - Tales of Maj'Eyal
-- Copyright (C) 2009, 2010, 2011 Nicolas Casalini
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
--
-- Nicolas Casalini "DarkGod"
-- darkgod@te4.org
base_size = 32
return { generator = function()
local ad = rng.range(0, 360)
local a = math.rad(ad)
local dir = math.rad(ad)
local r = rng.range(8, 18)
return {
life = 10,
size = 1, sizev = 0.3, sizea = -0.01,
x = r * math.cos(a), xv = 0, xa = 0,
y = r * math.sin(a), yv = 0, ya = 0,
dir = 0, dirv = 0, dira = 0,
vel = 0, velv = 0, vela = 0,
r = 0xD7/255, rv = 0, ra = 0,
g = 0x8E/255, gv = 0, ga = 0,
b = 0x45/255, bv = 0, ba = 0,
a = rng.range(100, 220)/255, av = 0.05, aa = 0,
}
end, },
function(self)
self.ps:emit(2)
end,
10
game/modules/tome/data/gfx/shockbolt/invis.png

195 B

game/modules/tome/data/gfx/shockbolt/npc/animal_bird_phoenix.png

7.39 KiB

game/modules/tome/data/gfx/shockbolt/npc/construct_golem_broken_golem.png

5.74 KiB

game/modules/tome/data/gfx/shockbolt/npc/dragon_cold_cold_drake_hatchling.png

7.57 KiB

game/modules/tome/data/gfx/shockbolt/npc/humanoid_shalore_elven_mage.png

5.93 KiB

game/modules/tome/data/gfx/shockbolt/npc/undead_giant_bone_giant.png

14 KiB

......@@ -47,7 +47,7 @@ local possible_types = {
{ name="lost warrior", random="male", chance=70,
text = [[Please help me! I am afraid I lost myself in this place. I know there is a recall portal left around here by a friend, but I have fought too many battles, and I fear I will not make it. Would you help me?]],
actor = {
type = "humanoid", subtype = "human",
type = "humanoid", subtype = "human", image = "player/higher_male.png",
display = "@", color=colors.UMBER,
name = "%s, the lost warrior",
desc = [[He looks tired and wounded.]],
......@@ -75,7 +75,7 @@ local possible_types = {
text = [[Please help me! I am afraid I lost myself in this place. I know there is a recall portal left around here by a friend, but I will not be able to continue the road alone. Would you help me?]],
actor = {
name = "%s, the injured seer",
type = "humanoid", subtype = "elf", female=true,
type = "humanoid", subtype = "elf", female=true, image = "player/halfling_female.png",
display = "@", color=colors.LIGHT_BLUE,
desc = [[She looks tired and wounded.]],
autolevel = "caster",
......@@ -101,7 +101,7 @@ local possible_types = {
text = [[Please help me! I am afraid I lost myself in this place. I know there is a recall portal left around here by a friend, but I have fought too many battles, and I fear I will not make it. Would you help me?]],
actor = {
name = "%s, the repented thief",
type = "humanoid", subtype = "halfling",
type = "humanoid", subtype = "halfling", image = "player/cornac_male.png",
display = "@", color=colors.BLUE,
desc = [[He looks tired and wounded.]],
autolevel = "rogue",
......@@ -128,7 +128,7 @@ local possible_types = {
text = [[Please help me! I am afraid I lost myself in this place. I know there is a recall portal left around here by a friend, but I have fought too many battles, and I fear I will not make it. Would you help me?]],
actor = {
name = "%s, the lone alchemist",
type = "humanoid", subtype = "human",
type = "humanoid", subtype = "human", image = "player/shalore_male.png",
display = "@", color=colors.AQUAMARINE,
desc = [[He looks tired and wounded.]],
autolevel = "rogue",
......@@ -154,7 +154,7 @@ local possible_types = {
text = [[Please help me! I am afraid I lost myself in this place. I know there is a recall portal left around here by a friend, but I have fought too many battles, and I fear I will not make it. Would you help me?]],
actor = {
name = "%s, the lost sun paladin",
type = "humanoid", subtype = "human", female=true,
type = "humanoid", subtype = "human", female=true, image = "player/higher_female.png",
display = "@", color=colors.GOLD,
desc = [[She looks tired and wounded.]],
autolevel = "warriormage",
......@@ -181,7 +181,7 @@ local possible_types = {
text = [[Please help me! I am afraid I lost myself in this place. I know there is a recall portal left around here by a friend, but I have fought too many battles, and I fear I will not make it. Would you help me?]],
actor = {
name = "%s, the lost anorithil",
type = "humanoid", subtype = "human", female=true,
type = "humanoid", subtype = "human", female=true, image = "player/higher_female.png",
display = "@", color=colors.YELLOW,
desc = [[She looks tired and wounded.]],
autolevel = "caster",
......@@ -208,7 +208,7 @@ local possible_types = {
text = [[Please help me! I am afraid I lost myself in this place. I know there is a recall portal left around here by a friend, but I have fought too many battles, and I fear I will not make it. Would you help me?]],
actor = {
name = "%s, the worried loremaster",
type = "humanoid", subtype = "human", female=true,
type = "humanoid", subtype = "human", female=true, image = "player/thalore_female.png",
display = "@", color=colors.LIGHT_GREEN,
desc = [[She looks tired and wounded.]],
autolevel = "wildcaster",
......
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