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 05-21-2020, 09:24 PM
webfischi webfischi is offline
Approved Member
 
Join Date: Dec 2019
Posts: 7
Default Indefinite damage with mask of envy

It looks like I'm the first who was able to catch that bug. When you attack, the damage is indefinite (zero).

The code for this mask is in arena.lua line 859-884 and looks like this:

Code:
  -- маска Зависти
	if hero_item_count2("sp_bonus_level_damage", "count") > 0 then
		if attacker ~= nil and receiver ~= nil and damage > 0 then
			local atk_level = Attack.act_level(attacker)
			if Attack.act_feature(attaker,"pawn") then 
				atk_level = 3
				if Attack.act_feature(attaker,"boss") then
					atk_level = 5
				end
			end
			
			local rec_level = Attack.act_level(receiver)
			if Attack.act_feature(receiver,"pawn") then 
				rec_level = 3
				if Attack.act_feature(receiver,"boss") then
					rec_level = 5
				end
			end
			
			if atk_level > rec_level then
				damage = damage * (1 + (atk_level - rec_level) * hero_item_count2("sp_bonus_level_damage", "count")/100)
				addrage = addrage * (1 + (atk_level - rec_level) * hero_item_count2("sp_bonus_level_damage", "count")/100)
			end
			
		end
	end
Edit: After further investigation, the game doesn't get anything from the "damage" equation, I added a line that should set damage to 1 no matter what solution was calculated earlier, and the game still says 0, so I guess it is missing some kind of return value.

Last edited by webfischi; 05-24-2020 at 09:45 PM. Reason: removed idea
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:08 AM.


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