Fulqrum Publishing Home   |   Register   |   Today Posts   |   Members   |   UserCP   |   Calendar   |   Search   |   FAQ

Go Back   Official Fulqrum Publishing forum > Fulqrum Publishing > King's Bounty > King's Bounty: Armored Princess > Mods

Mods Armored Princess mods

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #6  
Old 05-04-2010, 09:39 PM
zini4_tha_grunt zini4_tha_grunt is offline
Approved Member
 
Join Date: Dec 2009
Posts: 83
Default

there your script.
and it's taken from unit_features.lua, not addon_special_attacks.lua

Quote:
function features_vampirism( damage,addrage,attacker,receiver,minmax ) -- minmax, равный 1 или 2 означает, что функция вызывается только для определения мин/макс урона во всп.подсказке

if (minmax==0) and damage>0 then

-- сколько хитов у вампов
if --[[Attack.act_need_cure(attacker) or ]]Attack.cell_need_resurrect(attacker) then
if Attack.act_enemy(receiver) and not (Attack.act_feature(receiver,"undead,boss")) and not (Attack.act_feature(receiver,"plant")) and not (Attack.act_feature(receiver,"golem")) and not (Attack.act_feature(receiver,"pawn")) and not (Attack.act_name(receiver)=="griffin_spirit") then
local count_1 = Attack.act_size(attacker)

local vamp = math.min(Attack.act_totalhp(receiver), damage)
local hp1 = Attack.act_totalhp(attacker)
Attack.act_resurrect(attacker, math.floor(vamp+.5))

local count_2 = Attack.act_size(attacker)

Attack.atom_spawn(attacker, 0, "effect_total_cure")
local log_msg="add_blog_vamp_"

local special=count_2-count_1

if count_2==count_1 then
log_msg=log_msg.."0"
special = Attack.act_totalhp(attacker) - hp1
end

Attack.act_damage_addlog(receiver,log_msg,true)
Attack.log_special(special) -- работает

end
end

end

return damage,addrage
end
you must multiply "vamp"

this function being called from bat2 and bat.atom in line posthitmaster=features_vampirism
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:54 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2007 Fulqrum Publishing. All rights reserved.