Difference between revisions of "Talk:Flaming"

From CrawlWiki
Jump to: navigation, search
(Rounding for %-based brands: new section)
 
m (Rounding for %-based brands: re: damage brands)
Line 2: Line 2:
  
 
Simple question. How is the damage for flaming/freezing/etc. calculated? Because if it truncates, it makes quickblade of flaming worse than an executioner's axe of freezing. [[User:Hordes|Hordes]] ([[User talk:Hordes|talk]]) 07:19, 27 November 2023 (CET)
 
Simple question. How is the damage for flaming/freezing/etc. calculated? Because if it truncates, it makes quickblade of flaming worse than an executioner's axe of freezing. [[User:Hordes|Hordes]] ([[User talk:Hordes|talk]]) 07:19, 27 November 2023 (CET)
 +
 +
:Start at apply_damage_brand() in attack.cc, and check for <code>case SPWPN_FLAMING:</code>. It has a call to calc_elemental_brand_damage() there, which does <code>special_damage = resist_adjust_damage(defender, flavour, random2(damage_done) / 2 + 1);</code>, which is flaming's +0-50% damage. Then there's a check for the target's resists in resist_adjust_damage(), and so on and so forth. [[User:Ge0ff|Ge0ff]] ([[User talk:Ge0ff|talk]]) 17:32, 27 November 2023 (CET)

Revision as of 17:32, 27 November 2023

Rounding for %-based brands

Simple question. How is the damage for flaming/freezing/etc. calculated? Because if it truncates, it makes quickblade of flaming worse than an executioner's axe of freezing. Hordes (talk) 07:19, 27 November 2023 (CET)

Start at apply_damage_brand() in attack.cc, and check for case SPWPN_FLAMING:. It has a call to calc_elemental_brand_damage() there, which does special_damage = resist_adjust_damage(defender, flavour, random2(damage_done) / 2 + 1);, which is flaming's +0-50% damage. Then there's a check for the target's resists in resist_adjust_damage(), and so on and so forth. Ge0ff (talk) 17:32, 27 November 2023 (CET)