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
  #3  
Old 05-04-2010, 04:23 PM
zubovsergei zubovsergei is offline
Registered Member
 
Join Date: Dec 2009
Posts: 15
Default

I tried looking at the script but there are many places listing damage, etc. Here is the script maybe you can notice. Thanks


function special_vamp()

local cycle = Attack.get_cycle()


--local count=Attack.act_size(0)
local dmg_min,dmg_max = text_range_dec(Attack.get_custom_param("damage"))
local power=tonumber(Attack.get_custom_param("power"))

--local damage=Game.Random(dmg_min)
local typedmg=Attack.get_custom_param("typedmg")
Attack.atk_set_damage(typedmg,dmg_min)

local source, target

Attack.log_label('null')

if (cycle == 0) then
local source = Attack.get_target()
Attack.val_store("vamp_source", source)
--Attack.val_store("vamp_hp", math.min(Attack.act_totalhp(source))) --*power/100
Attack.next(0)
elseif (cycle == 1) then
source = Attack.val_restore("vamp_source")
target = Attack.get_target()

if ((source ~= nil) and (target ~= nil)) then
Attack.aseq_rotate(0, source)
Attack.act_aseq( 0, "cast" )
local dmgt = Attack.aseq_time(0, "x")

local a = Attack.atom_spawn(source, dmgt, "effect_life_minus", Attack.angleto(source))
local dmgts = Attack.aseq_time(a, "x")
Attack.atom_spawn(target, Attack.aseq_time(0, "y"), "effect_life_plus", Attack.angleto(target))

local max_hp=Attack.act_totalhp(source)
common_cell_apply_damage(source, dmgts+dmgt)
local max_dmg = Attack.act_damage_results(source)

local rephits = math.floor(math.min(min_dmg,max_hp)*power/100)

local count, hp = Attack.act_size(target),Attack.act_hp(target)
-- if Attack.get_caa(target) == nil then count = 0 end

local before = Attack.act_totalhp(target)
Attack.cell_resurrect(target, rephits, dmgts+dmgt)
local after = Attack.act_totalhp(target)

Attack.act_cure(target, -(Attack.act_size(target)-count), dmgts+dmgt) -- îòðèöàòåëüíîå ÷èñëî - òîëüêî îòëåò öèôð

count = Attack.act_size(target) - count
local heal = "resr"
if count == 0 then count = Attack.act_hp(target)-hp; heal = "heal" end
Attack.log_special(count, blog_side_unit(target,-1))
Attack.log_label('add_blog_vamp_'..heal)
end
end

return true
end
Reply With Quote
 

Thread Tools
Display Modes

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 05:00 AM.


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