Skip to content

Commit

Permalink
Revscript MonsterType Spell Fixes (#3903)
Browse files Browse the repository at this point in the history
Co-authored-by: Ranieri Althoff <1993083+ranisalt@users.noreply.github.com>
Co-authored-by: Evil Puncker <EPuncker@users.noreply.github.com>
  • Loading branch information
3 people committed Apr 7, 2023
1 parent 234776d commit 2f4e76e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
10 changes: 7 additions & 3 deletions data/monster/lua/#example.lua
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}
}

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
7 changes: 2 additions & 5 deletions data/scripts/lib/register_monster_type.lua
Expand Up @@ -337,11 +337,8 @@ 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
if ability.drunkenness then
spell:setConditionDrunkenness(ability.drunkenness)
end
end
if ability.condition then
Expand Down

0 comments on commit 2f4e76e

Please sign in to comment.