Skip to content
#1303
Auto-translated
Heroist
Added 1 minute ago


Well, after a battle with the hero 'Berein', if he wins, the number of enemy creatures killed should be displayed, and he should receive 100% of their bones:smile51: :smile51: :smile51:
Trigger( COMBAT_RESULTS_TRIGGER, "combat_results" )

function combat_results(c)
local we = -1
if GetSavedCombatArmyPlayer(c, 1) == PLAYER_1 then we = 1 end
if GetSavedCombatArmyPlayer(c, 0) == PLAYER_1 then we = 0 end
if we ~= -1 then
local they = 1 - we
if GetSavedCombatArmyHero(c,we) == "Berein" then
local stackscount = GetSavedCombatArmyCreaturesCount(c, they)
for i=0,stackscount-1 do
local creature, creaturescount, died = GetSavedCombatArmyCreatureInfo(c, they, i)
if died > 0 then
AddHeroCreatures('Berein', 29, died)
end
end
end
end
end

Statistics

Welcome our newest member: dodoD0D0