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

Timed effects are now displayed as icons

git-svn-id: http://svn.net-core.org/repos/t-engine4@4548 51575b47-30f0-44d4-a5cc-537603b46e54
parent 587535b4
No related branches found
No related tags found
No related merge requests found
Showing
with 28 additions and 98 deletions
......@@ -165,7 +165,7 @@ function _M:handleEffect(eff_id, e, p, ex, h)
local name = e.desc
local desc = nil
local eff_subtype = table.concat(table.keys(e.subtype), "/")
print("==",e.name,e.desc)
if e.display_desc then name = e.display_desc(self, p) end
if p.save_string and p.amount_decreased and p.maximum and p.total_dur then
desc = ("#{bold}##GOLD#%s\n(%s: %s)#WHITE##{normal}#\n"):format(name, e.type, eff_subtype)..e.long_desc(player, p).." "..("%s reduced the duration of this effect by %d turns, from %d to %d."):format(p.save_string, p.amount_decreased, p.maximum, p.total_dur)
......
game/modules/tome/data/gfx/effects/brainlocked.png

2.45 KiB

game/modules/tome/data/gfx/effects/continuum_destabilization.png

3.25 KiB

game/modules/tome/data/gfx/effects/golem_ofs.png

4.16 KiB

game/modules/tome/data/gfx/effects/imminent_paradox_clone.png

3.17 KiB

game/modules/tome/data/gfx/effects/intimidated.png

3.19 KiB

game/modules/tome/data/gfx/effects/offbalance.png

3.52 KiB

game/modules/tome/data/gfx/effects/power_overload.png

3.75 KiB

game/modules/tome/data/gfx/effects/smeared.png

4.33 KiB

game/modules/tome/data/gfx/effects/spacetime_stability.png

5.38 KiB

game/modules/tome/data/gfx/effects/spellshocked.png

3.71 KiB

game/modules/tome/data/gfx/effects/summon_destabilization.png

3.86 KiB

game/modules/tome/data/gfx/effects/temporal_stun.png

3.51 KiB

game/modules/tome/data/gfx/effects/time_dot.png

2.62 KiB

......@@ -39,7 +39,7 @@ newEffect = function(t)
t.image = "effects/"..(t.name):lower():gsub("[^a-z0-9_]", "_")..".png"
end
if fs.exists("/data/gfx/"..t.image) then t.display_entity = Entity.new{image=t.image, is_effect=true}
else t.display_entity = Entity.new{image="effects/default.png", is_effect=true}
else t.display_entity = Entity.new{image="effects/default.png", is_effect=true} print("===", t.type, t.name)
end
return oldNewEffect(t)
......
......@@ -25,7 +25,7 @@ local Map = require "engine.Map"
local Level = require "engine.Level"
newEffect{
name = "MANASURGE", image = "talents/rune_manasurge.png",
name = "MANASURGE", image = "talents/rune__manasurge.png",
desc = "Surging mana",
long_desc = function(self, eff) return ("The mana surge engulfs the target, regenerating %0.2f mana per turn."):format(eff.power) end,
type = "magical",
......@@ -119,7 +119,7 @@ newEffect{
}
newEffect{
name = "REFLECTIVE_SKIN",
name = "REFLECTIVE_SKIN", image = "talents/golem_reflective_skin.png",
desc = "Reflective Skin",
long_desc = function(self, eff) return ("Magically returns %d%% of any damage done to the attacker."):format(eff.power) end,
type = "magical",
......@@ -182,7 +182,7 @@ newEffect{
}
newEffect{
name = "SEE_INVISIBLE",
name = "SEE_INVISIBLE", image = "talents/keen_senses.png",
desc = "See Invisible",
long_desc = function(self, eff) return ("Improves/gives the ability to see invisible creatures (power %d)."):format(eff.power) end,
type = "magical",
......@@ -997,7 +997,7 @@ newEffect{
}
newEffect{
name = "PRESCIENCE",
name = "PRESCIENCE", image = "talents/premonition.png",
desc = "Prescience",
long_desc = function(self, eff) return ("The target's awareness is fully in the present, increasing stealth detection and see invisibility by %d, accuracy by %d, attack power by %d, spell power by %d, and mindpower by %d.")
:format(eff.detect, eff.accuracy, eff.physical, eff.spell, eff.mental) end,
......@@ -1079,7 +1079,7 @@ newEffect{
}
newEffect{
name = "FLAWED_DESIGN",
name = "FLAWED_DESIGN", image = "talents/flawed_design.png",
desc = "Flawed Design",
long_desc = function(self, eff) return ("The target's past has been altered, reducing all its resistances by %d%%."):format(eff.power) end,
type = "magical",
......@@ -1355,7 +1355,7 @@ newEffect{
}
newEffect{
name = "SPIN_FATE",
name = "SPIN_FATE", image = "talents/spin_fate.png",
desc = "Spin Fate",
long_desc = function(self, eff) return ("The target's defense has been increased by %d, physical save by %d, spell saves by %d, and mental saves by %d."):
format(eff.cur_defense or eff.defense, eff.cur_physical or eff.physical, eff.cur_spell or eff.spell, eff.cur_mental or eff.mental) end,
......
......@@ -365,7 +365,7 @@ newEffect{
}
newEffect{
name = "BECKONED",
name = "BECKONED", image = "talents/beckon.png",
desc = "Beckoned",
long_desc = function(self, eff)
local message = ("The target has been beckoned by %s and is heeding the call. There is a %d%% chance of moving towards the beckoner each turn."):format(eff.source.name, eff.chance)
......@@ -452,7 +452,7 @@ newEffect{
}
newEffect{
name = "OVERWHELMED",
name = "OVERWHELMED", image = "talents/frenzy.png",
desc = "Overwhelmed",
long_desc = function(self, eff) return ("The target has been overwhemed by a furious assault, reducing attack by %d."):format( -eff.attackChange) end,
type = "mental",
......@@ -472,7 +472,7 @@ newEffect{
}
newEffect{
name = "HARASSED",
name = "HARASSED", image = "talents/harass_prey.png",
desc = "Harassed",
long_desc = function(self, eff) return ("The target has been harassed by it's stalker, reducing damage by %d%%."):format( -eff.damageChange * 100) end,
type = "mental",
......@@ -753,7 +753,7 @@ newEffect{
}
newEffect{
name = "HATEFUL_WHISPER",
name = "HATEFUL_WHISPER", image = "talents/hateful_whisper.png",
desc = "Hateful Whisper",
long_desc = function(self, eff) return ("%s has heard the hateful whisper."):format(self.name:capitalize()) end,
type = "mental",
......@@ -909,7 +909,7 @@ newEffect{
end,
}
newEffect{
name = "PSIFRENZY",
name = "PSIFRENZY", image = "talents/frenzied_psifighting.png",
desc = "Frenzied Psi-fighting",
long_desc = function(self, eff) return ("Causes telekinetically-wielded weapons to hit up to %d targets each turn."):format(eff.power) end,
type = "mental",
......@@ -921,7 +921,7 @@ newEffect{
}
newEffect{
name = "KINSPIKE_SHIELD",
name = "KINSPIKE_SHIELD", image = "talents/kinetic_shield.png",
desc = "Spiked Kinetic Shield",
long_desc = function(self, eff) return ("The target erects a powerful kinetic shield capable of absorbing %d/%d physical or acid damage before it crumbles."):format(self.kinspike_shield_absorb, eff.power) end,
type = "mental",
......@@ -940,7 +940,7 @@ newEffect{
end,
}
newEffect{
name = "THERMSPIKE_SHIELD",
name = "THERMSPIKE_SHIELD", image = "talents/thermal_shield.png",
desc = "Spiked Thermal Shield",
long_desc = function(self, eff) return ("The target erects a powerful thermal shield capable of absorbing %d/%d thermal damage before it crumbles."):format(self.thermspike_shield_absorb, eff.power) end,
type = "mental",
......@@ -959,7 +959,7 @@ newEffect{
end,
}
newEffect{
name = "CHARGESPIKE_SHIELD",
name = "CHARGESPIKE_SHIELD", image = "talents/charged_shield.png",
desc = "Spiked Charged Shield",
long_desc = function(self, eff) return ("The target erects a powerful charged shield capable of absorbing %d/%d lightning or blight damage before it crumbles."):format(self.chargespike_shield_absorb, eff.power) end,
type = "mental",
......@@ -1015,7 +1015,7 @@ newEffect{
}
newEffect{
name = "MASTERFUL_TELEKINETIC_ARCHERY",
name = "MASTERFUL_TELEKINETIC_ARCHERY", image = "talents/masterful_telekinetic_archery.png",
desc = "Telekinetic Archery",
long_desc = function(self, eff) return ("Your telekinetically-wielded bow automatically attacks the nearest target each turn.") end,
type = "mental",
......@@ -1492,7 +1492,7 @@ newEffect{
}
newEffect{
name = "FRANTIC_SUMMONING",
name = "FRANTIC_SUMMONING", image = "talents/frantic_summoning.png",
desc = "Frantic Summoning",
long_desc = function(self, eff) return ("Reduces the time taken for summoning by %d%%."):format(eff.power) end,
type = "mental",
......
......@@ -43,7 +43,7 @@ newEffect{
newEffect{
name = "RUNE_COOLDOWN", image = "effects/rune_cooldown.png",
desc = "Runic Saturation",
long_desc = function(self, eff) return ("The more you use runes, the longer they will take to recharge (+%d cooldowns)."):format(eff.power) end,
long_desc = function(self, eff) table.print(eff) return ("The more you use runes, the longer they will take to recharge (+%d cooldowns)."):format(eff.power) end,
type = "other",
subtype = { rune=true },
status = "detrimental",
......
......@@ -70,7 +70,7 @@ newEffect{
}
newEffect{
name = "REGENERATION", image = "talents/infusion_regeneration.png",
name = "REGENERATION", image = "talents/infusion__regeneration.png",
desc = "Regeneration",
long_desc = function(self, eff) return ("A flow of life spins around the target, regenerating %0.2f life per turn."):format(eff.power) end,
type = "physical",
......@@ -661,7 +661,7 @@ newEffect{
}
newEffect{
name = "HEROISM", image = "talents/infusion_heroism.png",
name = "HEROISM", image = "talents/infusion__heroism.png",
desc = "Heroism",
long_desc = function(self, eff) return ("Increases your three highest stats by %d."):format(eff.power) end,
type = "physical",
......@@ -768,34 +768,6 @@ newEffect{
end,
}
newEffect{
name = "GOLEM_MOUNT",
desc = "Golem Mount",
long_desc = function(self, eff) return "The target is inside his golem." end,
type = "physical",
subtype = { golem=true },
status = "beneficial",
parameters = { },
activate = function(self, eff)
self:wearObject(eff.mount, true, true)
game.level:removeEntity(eff.mount.mount.actor)
eff.mount.mount.effect = self.EFF_GOLEM_MOUNT
end,
deactivate = function(self, eff)
if self:removeObject(self.INVEN_MOUNT, 1, true) then
-- Only unmount if dead
if not eff.mount.mount.actor.dead then
-- Find space
local x, y = util.findFreeGrid(self.x, self.y, 10, true, {[engine.Map.ACTOR]=true})
if x then
eff.mount.mount.actor:move(x, y, true)
game.level:addEntity(eff.mount.mount.actor)
end
end
end
end,
}
newEffect{
name = "BURROW", image = "talents/burrow.png",
desc = "Burrow",
......@@ -836,24 +808,6 @@ newEffect{
end,
}
newEffect{
name = "NO_SUMMON",
desc = "Suppress Summon",
long_desc = function(self, eff) return "Your summons are suppressed by some force." end,
type = "physical",
subtype = { supression=true },
status = "detrimental",
parameters = {},
on_gain = function(self, err) return "#Target# attunes to the damage.", "+Resolve" end,
on_lose = function(self, err) return "#Target# is no longer attuned.", "-Resolve" end,
activate = function(self, eff)
eff.tmpid = self:addTemporaryValue("suppress_summon", 1)
end,
deactivate = function(self, eff)
self:removeTemporaryValue("suppress_summon", eff.tmpid)
end,
}
newEffect{
name = "RESOLVE", image = "talents/resolve.png",
desc = "Resolve",
......@@ -873,7 +827,7 @@ newEffect{
}
newEffect{
name = "WILD_SPEED", image = "talents/infusion_movement.png",
name = "WILD_SPEED", image = "talents/infusion__movement.png",
desc = "Wild Speed",
long_desc = function(self, eff) return ("The movement infusion allows you to run at extreme fast pace. Any other action other than movement will cancel it .Movement is %d%% faster."):format(eff.power) end,
type = "physical",
......@@ -946,7 +900,7 @@ newEffect{
}
newEffect{
name = "DRAGONS_FIRE",
name = "DRAGONS_FIRE", image = "talents/fire_breath.png",
desc = "Dragon's Fire",
long_desc = function(self, eff) return ("Dragon blood runs through your veins. You can breathe fire (or have it improved if you already could)."):format() end,
type = "physical",
......@@ -985,30 +939,6 @@ newEffect{
end,
}
newEffect{
name = "CRUSHED",
desc = "Crushed",
long_desc = function(self, eff) return ("Intense gravity that pins and deals %0.2f physical damage per turn."):format(eff.power) end,
type = "physical",
subtype = { gravity=true },
status = "detrimental",
parameters = { power=10 },
on_gain = function(self, err) return "#Target# is being crushed!", "+Crushed" end,
on_lose = function(self, err) return "#Target# stops being crushed.", "-Crushed" end,
on_merge = function(self, old_eff, new_eff)
-- Merge the flames!
local olddam = old_eff.power * old_eff.dur
local newdam = new_eff.power * new_eff.dur
local dur = math.ceil((old_eff.dur + new_eff.dur) / 2)
old_eff.dur = dur
old_eff.power = (olddam + newdam) / dur
return old_eff
end,
on_timeout = function(self, eff)
DamageType:get(DamageType.PHYSICAL).projector(eff.src, self.x, self.y, DamageType.PHYSICAL, eff.power)
end,
}
newEffect{
name = "GREATER_WEAPON_FOCUS", image = "talents/greater_weapon_focus.png",
desc = "Greater Weapon Focus",
......@@ -1098,7 +1028,7 @@ newEffect{
}
newEffect{
name = "STRANGLE_HOLD",
name = "STRANGLE_HOLD", image = "talents/clinch.png",
desc = "Strangle Hold",
long_desc = function(self, eff) return ("The target is being strangled and may not cast spells and suffers %d damage each turn."):format(eff.power) end,
type = "physical",
......@@ -1188,7 +1118,7 @@ newEffect{
}
newEffect{
name = "SET_UP",
name = "SET_UP", image = "talents/set_up.png",
desc = "Set Up",
long_desc = function(self, eff) return ("The target is off balance and is %d%% more likely to be crit by the target that set it up. In addition all it's saves are reduced by %d."):format(eff.power, eff.power) end,
type = "physical",
......@@ -1421,7 +1351,7 @@ newEffect{
}
newEffect{
name = "IMPLODING",
name = "IMPLODING", image = "talents/implode.png",
desc = "Slow",
long_desc = function(self, eff) return ("Slowed by 50%% and taking %d crushing damage per turn."):format( eff.power) end,
type = "physical",
......@@ -1464,7 +1394,7 @@ newEffect{
}
newEffect{
name = "ADRENALINE_SURGE",
name = "ADRENALINE_SURGE", image = "talents/adrenaline_surge.png",
desc = "Adrenaline Surge",
long_desc = function(self, eff) return ("The target's combat damage is improved by %d and it an continue to fight past the point of exhaustion, supplementing life for stamina."):format(eff.power) end,
type = "physical",
......@@ -1482,7 +1412,7 @@ newEffect{
}
newEffect{
name = "BLINDSIDE_BONUS",
name = "BLINDSIDE_BONUS", image = "talents/blindside.png",
desc = "Blindside Bonus",
long_desc = function(self, eff) return ("The target has appeared out of nowhere! It's defense is boosted by %d."):format(eff.defenseChange) end,
type = "physical",
......
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