prefabs/walrus.lua
17181920212223242526272829303132
"walrus_tusk",
}
local loot =
{
"meat",
"blowdart_pipe",
}
local wee_loot =
{
"meat",
}
local function OnAttacked(inst, data)
inst.components.combat:SetTarget(data.attacker)
171819202122232425262728293031323334
"walrus_tusk",
}
SetSharedLootTable( 'walrus',
{
{'meat', 1.00},
{'blowdart_pipe', 1.00},
{'walrushat', 0.25},
{'walrus_tusk', 0.50},
})
SetSharedLootTable( 'walrus_wee_loot',
{
['meat'] = 1.0,
})
local function OnAttacked(inst, data)
inst.components.combat:SetTarget(data.attacker)
143144145146147148149150151152
inst.components.health:SetMaxHealth(TUNING.WALRUS_HEALTH)
inst:AddComponent("lootdropper")
inst.components.lootdropper:SetLoot(loot)
inst.components.lootdropper:AddChanceLoot("walrushat", 0.25)
inst.components.lootdropper:AddChanceLoot("walrus_tusk", 0.5)
inst:AddComponent("inventory")
145146147148149150151
inst.components.health:SetMaxHealth(TUNING.WALRUS_HEALTH)
inst:AddComponent("lootdropper")
inst.components.lootdropper:SetChanceLootTable('walrus')
inst:AddComponent("inventory")
176177178179180181182
inst.soundgroup = "wee_mctusk"
inst.components.lootdropper:SetLoot(wee_loot)
inst.AnimState:SetBuild("walrus_baby_build")
175176177178179180181
inst.soundgroup = "wee_mctusk"
inst.components.lootdropper:SetChanceLootTable('walrus_wee_loot')
inst.AnimState:SetBuild("walrus_baby_build")