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: Warriors of the North

King`s Bounty: Warriors of the North Next game in the award-winning King’s Bounty series

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #11  
Old 11-05-2012, 05:18 PM
hardy87 hardy87 is offline
Approved Member
 
Join Date: Jun 2011
Posts: 15
Default

Here, my fix for Warrior Maiden Call of Valhalla

open file unit_special_attacks.lua in ses.kfs, and search "Valhalla". Then replace this

Code:
function special_valhalla_call_calccells()
  local level = Attack.get_custom_param("level")
  if level == nil or level == "" then
    level = 4
  else
    level = tonumber(level)
  end

  local ccnt = Attack.cell_count()
  for i = 0, ccnt-1 do
    local cell = Attack.cell_get(i)
    if Attack.act_ally(cell) then
      if (Attack.act_level(cell) <= level) then
        if Attack.act_applicable(cell) then
          if (Attack.cell_dist(0, cell) >= 1) then
            local size_last2 = Attack.val_restore(cell, "size_last2")
            if size_last2 == nil or size_last2 == "" then
              size_last2 = Attack.act_initsize(cell)
            else
              size_last2 = tonumber(size_last2)
            end
            if ( size_last2 > Attack.act_size(cell) ) then
              Attack.marktarget(cell)
            end
          end
        end
      end
    end
  end

  return true
end

function special_valhalla_call_attack()
  local target = Attack.get_target()
  if target ~= nil then
    Attack.aseq_rotate(0, target, "special")
    local dmgts = Attack.aseq_time(0, "x")

    local power, power_max = text_range_dec(Attack.get_custom_param("count"))
    power = power*Attack.act_size(0)
    local act = Attack.get_caa(target)
    local count0 = Attack.val_restore(act, "size_last2")
    if count0 == nil or count0 == "" then
      count0 = Attack.act_initsize(act)
    else
      count0 = tonumber(count0)
    end
    local count1 = Attack.act_size(act)
    local rephits = math.min( power, (count0 - count1) )*Attack.act_get_par(act, "health")
    Attack.cell_resurrect(act, rephits)
    Attack.atom_spawn(act, dmgts, "magic_wing", Attack.angleto(act))

    local count2 = Attack.act_size(target)
    Attack.log_label("respawn_")
    Attack.act_damage_addlog(target, "res_")
    Attack.log_special(count2-count1)
  end

  return true
end
or you can use my edited file Call of Valhalla ability will work

ps: sorry for my bad english !
Attached Files
File Type: zip unit_special_attacks.zip (44.4 KB, 63 views)

Last edited by hardy87; 11-06-2012 at 01:59 AM.
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 07:47 PM.


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