Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revscript MonsterType Spell Fixes #3903

Merged
merged 8 commits into from
Apr 7, 2023
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions data/monster/lua/#example.lua
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,22 @@ monster.loot = {
monster.attacks = {
{name = "melee", attack = 130, skill = 70, effect = CONST_ME_DRAWBLOOD, interval = 2*1000},
{name = "energy strike", range = 1, chance = 10, interval = 2*1000, minDamage = -210, maxDamage = -300, target = true},
{name = "combat", type = COMBAT_MANADRAIN, chance = 10, interval = 2*1000, minDamage = 0, maxDamage = -120, target = true, range = 7, effect = CONST_ME_MAGIC_BLUE},
{name = "combat", type = COMBAT_MANADRAIN, chance = 100, interval = 2*1000, minDamage = 0, maxDamage = -10, target = true, range = 7, condition = { type = CONDITION_CURSED, minDamage = 10, maxDamage = 20, duration = 5000, interval = 1000}},
{name = "combat", type = COMBAT_FIREDAMAGE, chance = 20, interval = 2*1000, minDamage = -150, maxDamage = -250, radius = 1, target = true, effect = CONST_ME_FIREAREA, shootEffect = CONST_ANI_FIRE},
{name = "combat", type = COMBAT_LIFEDRAIN, chance = 10, interval = 2*1000, length = 8, spread = 0, minDamage = -300, maxDamage = -490, effect = CONST_ME_PURPLEENERGY},
{name = "speed", chance = 15, interval = 2*1000, speed = -700, radius = 1, target = true, duration = 30*1000, effect = CONST_ME_MAGIC_RED},
{name = "firefield", chance = 10, interval = 2*1000, range = 7, radius = 1, target = true, shootEffect = CONST_ANI_FIRE},
{name = "combat", type = COMBAT_LIFEDRAIN, chance = 10, interval = 2*1000, length = 8, spread = 0, minDamage = -300, maxDamage = -490, effect = CONST_ME_PURPLEENERGY}
{name = "condition", chance = 1000, range = 1, condition = { type = CONDITION_ENERGY, minDamage = 10, maxDamage = 20, duration = 5000, interval = 1000}},
{name = "drunk", chance = 10, interval = 2000, drunkenness = 25, duration = 5000, range = 7, shootEffect = CONST_ANI_ENERGY},
{name = "outfit", chance = 10, interval = 2000, item = 7172, duration = 8000, range = 7, effect = CONST_ME_MAGIC_BLUE}
ranisalt marked this conversation as resolved.
Show resolved Hide resolved
}

monster.defenses = {
defense = 55,
armor = 55,
{name = "combat", type = COMBAT_HEALING, chance = 15, interval = 2*1000, minDamage = 180, maxDamage = 250, effect = CONST_ME_MAGIC_BLUE},
{name = "speed", chance = 15, interval = 2*1000, speed = 320, effect = CONST_ME_MAGIC_RED}
{name = "speed", chance = 15, interval = 2*1000, speed = 320, effect = CONST_ME_MAGIC_RED},
{name = "invisible", chance = 15, interval = 2000, duration = 3000, effect = CONST_ME_MAGIC_BLUE}
}

monster.elements = {
Expand Down
9 changes: 3 additions & 6 deletions data/scripts/lib/register_monster_type.lua
Original file line number Diff line number Diff line change
Expand Up @@ -331,12 +331,9 @@ local function AbilityTableToSpell(ability)
if outfit then
spell:setOutfit(outfit)
end
if ability.name == "drunk" then
spell:setConditionType(CONDITION_DRUNK)
if ability.drunkenness then
spell:setConditionDrunkenness(ability.drunkenness)
end
end
if ability.drunkenness then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indentation

spell:setConditionDrunkenness(ability.drunkenness)
end
end
if ability.condition then
if ability.condition.type then
Expand Down