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

refactor: white deer scripts to core #2343

Merged
merged 1 commit into from
Mar 2, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
local config = {
-- ordered by chance, the last chance being 100
{ chance = 30, monster = "Enraged White Deer", message = "The white deer summons all his strength and turns to fight!" },
{ chance = 100, monster = "Desperate White Deer", message = "The white deer desperately tries to escape!" },
}

local whiteDeerDeath = CreatureEvent("WhiteDeerDeath")
function whiteDeerDeath.onDeath(creature, corpse, killer, mostDamageKiller, unjustified, mostDamageUnjustified)

function whiteDeerDeath.onDeath(creature, corpse, killer, mostDamageKiller, lastHitUnjustified, mostDamageUnjustified)
local targetMonster = creature:getMonster()
if not targetMonster or targetMonster:getMaster() then
return true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
local whiteDeerScoutsDeath = CreatureEvent("WhiteDeerScoutsDeath")
function whiteDeerScoutsDeath.onDeath(creature, corpse, lasthitkiller, mostdamagekiller, lasthitunjustified, mostdamageunjustified)

function whiteDeerScoutsDeath.onDeath(creature, corpse, killer, mostDamageKiller, lastHitUnjustified, mostDamageUnjustified)
local targetMonster = creature:getMonster()
if not targetMonster or targetMonster:getMaster() then
return true
Expand All @@ -16,6 +17,7 @@ function whiteDeerScoutsDeath.onDeath(creature, corpse, lasthitkiller, mostdamag

targetMonster:say("The elves came too late to save the deer, however they might avenge it.", TALKTYPE_MONSTER_SAY)
end
return true
end

whiteDeerScoutsDeath:register()
Loading