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

Reply
 
Thread Tools Display Modes
  #1  
Old 04-24-2010, 12:54 AM
N3MES1S N3MES1S is offline
Approved Member
 
Join Date: Nov 2009
Posts: 241
Default

I just used the prayer skill from the paladin to create another "prayer" style skill on my phoenix mod. It resurrect ALL units except undead, and undead doesnt suffer damage.

And like Zini4 said, dont modify the original files, create your own script files with a copy of the skill u want to use, and refer it in the atom file, look examples.

U dont need to start a new game, the final part of the code should be like this (this is my phoenix mod code, but healing/res all units):

function legendaryphoenix_resur()

Attack.aseq_remove(0)
Attack.act_aseq(0,"victory")

local pal_count = Attack.act_size(0)
local dmgts = Attack.aseq_time(0, "x") -- x time of attacker

Attack.atom_spawn(0, dmgts, "effect_lightpower")
dmgts1=0 --Attack.aseq_time(a, "x")

local ccnt = Attack.cell_count()
for i=0,ccnt-1 do

local tgt = Attack.cell_get(i)

if tgt~=nil and Attack.cell_dist(0,tgt)<=1 then
if Attack.act_ally(tgt) then

if (Attack.act_need_cure(tgt) or Attack.cell_need_resurrect(tgt)) and (Attack.act_ally(tgt) and not (Attack.act_feature(tgt,"golem,plant,mech,pawn,bos s"))) then
local min_dmg,max_dmg = text_range_dec(Attack.get_custom_param("heal"))
local heal = math.floor(Game.CurLocRand(min_dmg*pal_count,max_d mg*pal_count))*(1+tonumber(skill_power2("resurrect ion",2)/100))

local need = Attack.act_initsize(tgt)*Attack.act_get_par(tgt,"h ealth") - Attack.act_totalhp(tgt)
if need < 0 then need = Attack.act_get_par(tgt,"health") - Attack.act_hp(tgt) end
heal = math.min(need, heal)

local aa = Attack.atom_spawn(tgt, dmgts+dmgts1, "effect_total_cure")
local dmgts3 = Attack.aseq_time(aa, "x")
local count_old = Attack.act_size(tgt)

if need > 0 and Attack.cell_need_resurrect(tgt) then
Attack.cell_resurrect(tgt, heal, dmgts+dmgts1+dmgts3)
local n = Attack.act_size(tgt) - count_old
if n > 0 then
Attack.act_cure(tgt, -n, dmgts+dmgts1+dmgts3)
end
end


local d, label, slabel = Attack.act_size(tgt) - count_old
if Attack.act_size(tgt)>1 then slabel = "2" else slabel = "1" end
if d > 0 then label = "add_blog_res_"; heal = d else label = "add_blog_cure_" end
Attack.log(0.001, label..slabel, "target",blog_side_unit(tgt,0),"special",heal)
end
end
end
end


return true
end
Reply With Quote
Reply


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 08:10 AM.


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