I want to create magical staffs with secondary actions without a charge buildup so that they fire instantly when you rightclick them.
In this case I gave the staff of manar from dm pack a lightning bolt function as it looks a bit like a lightning rod.
I tried buildup = 0, but that doesn't work as it will produce a message: not enough energy, which is not the case.
I looked for the "weapon of power" in the g1 pack, it's some sort of gun that instantly fires a lightning projectile, but I can't find the object in the files to check for the code used.
Code: Select all
defineObject{
name = "dm_staff_of_manar",
baseObject = "base_dm_item",
components = {
{
class = "Model",
model = "mod_assets/dmcsb_pack/models/items/dm_staff_of_manar.fbx",
},
{
class = "Item",
uiName = "Staff of Manar",
description = "An ancient magical staff.",
gfxAtlas = "mod_assets/dmcsb_pack/textures/gui/dm_icoatlas.tga",
gfxIndex = 71,
gfxIndexPowerAttack = 150,
impactSound = "impact_blunt",
weight = 2.9,
secondaryAction = "Lightning",
},
{
class = "EquipmentItem",
slot = "Weapon",
willpower = 2,
energy = 25,
},
{
class = "CastSpell",
name = "Lightning",
uiName = "Lightning Bolt",
gameEffect = "Conjures a Lightning Bolt",
cooldown = 5,
spell = "lightning_bolt",
energyCost = 25,
power = 3,
requirements = { "concentration", 1 },
},
},
}