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

fix Moon/Star pairing

git-svn-id: http://svn.net-core.org/repos/t-engine4@2570 51575b47-30f0-44d4-a5cc-537603b46e54
parent a09e69e6
No related branches found
No related tags found
No related merge requests found
......@@ -830,6 +830,22 @@ newDamageType{
end,
}
-- Blind
newDamageType{
name = "% chances to blind", type = "RANDOM_BLIND",
projector = function(src, x, y, type, dam)
if _G.type(dam) == "number" then dam = {dam=dam} end
local target = game.level.map(x, y, Map.ACTOR)
if target and rng.percent(dam.dam) then
if target:checkHit((dam.power_check or src.combatSpellpower)(src), (dam.resist_check or target.combatMentalResist)(target), 0, 95, 15) and target:canBe("confusion") then
target:setEffect(target.EFF_BLINDED, dam.dam, {})
else
game.logSeen(target, "%s resists!", target.name:capitalize())
end
end
end,
}
-- Physical + Blind
newDamageType{
name = "sand", type = "SAND",
......
......@@ -707,7 +707,7 @@ local activate_pair = function(moon, star, who)
moon.paired._special3 = {who, {"inc_damage", DamageType.DARKNESS}, who:addTemporaryValue({"inc_damage", DamageType.DARKNESS}, 10)}
-- The Star knife's bonuses
star.paired._special1 = {who, "lite", who:addTemporaryValue("lite", 1)}
star.paired._special2 = {star, "combat", star:addTemporaryValue("combat", {melee_project={[DamageType.RANDOM_BLINDPHYSICAL]=3}})}
star.paired._special2 = {star, "combat", star:addTemporaryValue("combat", {melee_project={[DamageType.RANDOM_BLIND]=3}})}
star.paired._special3 = {who, "inc_damage", who:addTemporaryValue("inc_damage", {[DamageType.LIGHT]=10}) }
game.logPlayer(who, "The two blades glow brightly as they are brought close together.")
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