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 10-30-2012, 09:50 PM
camelotcrusade's Avatar
camelotcrusade camelotcrusade is offline
Approved Member
 
Join Date: Apr 2009
Location: San Francisco, CA
Posts: 448
Default

That looks great, thanks for using those colors.

Okay so I hunted for the confused effect but then i realized since it only applies on the world map it might bug out if I used it in combat. So instead I found Stun, that would at least indicate "this unit isn't going to do anything this turn."

Here it is:

Code:
-- ***********************************************
-- * Stun
-- ***********************************************
function effect_stun_attack(target, pause, duration, log_message)
  --local target = Attack.get_target()
  if pause == nil then
    pause = 1
  end
  if target == nil then
    target = Attack.get_target()
  end
  if duration == nil then
    duration = tonumber(Logic.obj_par("effect_stun", "duration"))
  end
  if (Attack.act_ally(target) or Attack.act_enemy(target)) and not Attack.act_feature(target, "boss,pawn") then
    --local duration = tonumber(Attack.get_custom_param("duration"))
    duration = correct_spell_duration (duration, target, true)
    local inbonus = tonumber(Logic.obj_par("effect_stun", "inbonus"))
    local speedbonus = tonumber(Logic.obj_par("effect_stun", "speedbonus"))
--    local speed = Attack.act_get_par(target, "speed")

--    local change_speed = speed - speedbonus

    Attack.act_del_spell(target,"effect_stun")
    Attack.act_apply_spell_begin( target, "effect_stun", duration, false )
      Attack.act_apply_par_spell( "disreload", 10, 0, 0, duration, false)
      Attack.act_apply_par_spell( "disspec", 10, 0, 0, duration, false)
      Attack.act_apply_par_spell( "initiative", -inbonus, 0, 0, duration, false)
      Attack.act_apply_par_spell( "speed", -speedbonus , 0, 0, duration, false)
    Attack.act_apply_spell_end()
    Attack.atom_spawn(target, pause, "effect_stun", 0, true)

    -- log_message = -1 - íåò ëîãà, 0 - ïðèïèñûâàåì ê äàìàãó, 1 - âûâîäèì îòäåëüíîé ñòðîêîé
    if log_message == nil then
      log_message = 0
    end
    if log_message == 0 then
      Attack.act_damage_addlog(target, "add_blog_stun_")
    elseif log_message == 1 then
      if Attack.act_size(target) > 1 then
        Attack.log(pause, "add_blog_stun_2", "targets", blog_side_unit(target, 1))
      else
        Attack.log(pause, "add_blog_stun_1", "target",  blog_side_unit(target, 1))
      end
    end
  end

  return true
end
Any idea where the visual effect is in all that? I don't want the unit to actually be stunned, just look like while they are distracted.
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 06:57 AM.


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