7 uint16_t source, uint16_t target,
8 uint16_t current_damage,
9 uint16_t is_spell_damage,
10 uint32_t is_ranged_damage,
17 return current_damage;
22 uint16_t source, uint16_t target,
23 uint16_t current_damage,
24 uint16_t is_spell_damage,
25 uint32_t is_ranged_damage,
28 if ((!is_ranged_damage) && (!is_spell_damage))
33 current_damage = (uint16_t)((current_damage * spell_data.
params[1]) /
35 return current_damage;
37 return current_damage;
41 uint16_t source, uint16_t target,
42 uint16_t current_damage,
43 uint16_t is_spell_damage,
44 uint32_t is_ranged_damage,
53 uint16_t source, uint16_t target,
54 uint16_t current_damage,
55 uint16_t is_spell_damage,
56 uint32_t is_ranged_damage,
59 if ((!is_ranged_damage) && (!is_spell_damage) && (source != 0))
71 return current_damage;
75 uint16_t source, uint16_t target,
76 uint16_t current_damage,
77 uint16_t is_spell_damage,
78 uint32_t is_ranged_damage,
88 if (shield_value < current_damage)
90 current_damage = current_damage - shield_value;
95 shield_value = shield_value - current_damage;
100 if (shield_value == 0)
108 return current_damage;
112 uint16_t source, uint16_t target,
113 uint16_t current_damage,
114 uint16_t is_spell_damage,
115 uint32_t is_ranged_damage,
119 return current_damage;
123 uint16_t source, uint16_t target,
124 uint16_t current_damage,
125 uint16_t is_spell_damage,
126 uint32_t is_ranged_damage,
134 uint16_t reflect_amount = (uint16_t)((current_damage *
135 spell_data.
params[0]) / 100);
136 if (current_damage < reflect_amount)
139 reflect_amount = current_damage;
143 current_damage = current_damage - reflect_amount;
150 &source_data, &target_data,
153 return current_damage;
157 uint16_t source, uint16_t target,
158 uint16_t current_damage,
159 uint16_t is_spell_damage,
160 uint32_t is_ranged_damage,
168 if (current_health <= current_damage)
170 if (roll_value <= spell_data.
params[2])
172 current_damage = current_health - 1;
175 return current_damage;
179 uint16_t source, uint16_t target,
180 uint16_t current_damage,
181 uint16_t is_spell_damage,
182 uint32_t is_ranged_damage,
190 while (spell_index != 0)
201 return current_damage;
206 uint16_t source, uint16_t target,
207 uint16_t current_damage,
208 uint16_t is_spell_damage,
209 uint32_t is_ranged_damage,
213 if (mana_left < current_damage)
215 current_damage = current_damage - mana_left;
227 &source_data, &target_data,
229 return current_damage;
SpellFunctions * spellAPI
FigureFunctions * figureAPI
ToolboxFunctions * toolboxAPI
EffectFunctions effectAPI
@ SPELL_CONSERVATION_SHIELD
@ kGdEffectSpellVoodooHitFigure
@ kGdEffectSpellManaShieldHitFigure
uint16_t __thiscall hypnotize_dmg_handler(SF_CGdFigureToolbox *_this, uint16_t source, uint16_t target, uint16_t current_damage, uint16_t is_spell_damage, uint32_t is_ranged_damage, uint16_t spell_id)
uint16_t __thiscall durability_dmg_handler(SF_CGdFigureToolbox *_this, uint16_t source, uint16_t target, uint16_t current_damage, uint16_t is_spell_damage, uint32_t is_ranged_damage, uint16_t spell_id)
uint16_t __thiscall steelskin_dmg_handler(SF_CGdFigureToolbox *_this, uint16_t source, uint16_t target, uint16_t current_damage, uint16_t is_spell_damage, uint32_t is_ranged_damage, uint16_t spell_id)
uint16_t __thiscall mana_shield_dmg_handler(SF_CGdFigureToolbox *_this, uint16_t source, uint16_t target, uint16_t current_damage, uint16_t is_spell_damage, uint32_t is_ranged_damage, uint16_t spell_id)
uint16_t invulnerability_dmg_handler(SF_CGdFigureToolbox *_this, uint16_t source, uint16_t target, uint16_t current_damage, uint16_t is_spell_damage, uint32_t is_ranged_damage, uint16_t spell_id)
uint16_t __thiscall feedback_dmg_handler(SF_CGdFigureToolbox *_this, uint16_t source, uint16_t target, uint16_t current_damage, uint16_t is_spell_damage, uint32_t is_ranged_damage, uint16_t spell_id)
uint16_t __thiscall dmg_shield_dmg_handler(SF_CGdFigureToolbox *_this, uint16_t source, uint16_t target, uint16_t current_damage, uint16_t is_spell_damage, uint32_t is_ranged_damage, uint16_t spell_id)
uint16_t __thiscall death_grasp_dmg_handler(SF_CGdFigureToolbox *_this, uint16_t source, uint16_t target, uint16_t current_damage, uint16_t is_spell_damage, uint32_t is_ranged_damage, uint16_t spell_id)
uint16_t __thiscall feign_death_dmg_handler(SF_CGdFigureToolbox *_this, uint16_t source, uint16_t target, uint16_t current_damage, uint16_t is_spell_damage, uint32_t is_ranged_damage, uint16_t spell_id)
uint16_t __thiscall conservation_dmg_handler(SF_CGdFigureToolbox *_this, uint16_t source, uint16_t target, uint16_t current_damage, uint16_t is_spell_damage, uint32_t is_ranged_damage, uint16_t spell_id)
getRandom_ptr getRandom
Generates a random value up to the specified maximum value.
getResourceSpellData_ptr getResourceSpellData
setEffectDone_ptr setEffectDone
Stops a spell effect handler for a given spell.
getXData_ptr getXData
Retrieves the XData value for a specific spell.
addSpell_ptr addSpell
Creates a new spell of a given spell type.
figTryClrCHkSPlBfrJob2_ptr figTryClrCHkSPlBfrJob2
clears the CHECK_SPELLS_BEFORE_JOB2 flag
removeDLLNode_ptr removeDLLNode
Used to remove a spell from the list of active spells over the target.
figTryUnfreeze_ptr figTryUnfreeze
clears the UNFREEZE flag
setXData_ptr setXData
This function is used to assign specific value to an XData key of a given spell.
figClrChkSplBfrChkBattle_ptr figClrChkSplBfrChkBattle
Clears the CHECK_SPELLS_BEFORE_CHECK_BATTLE flag.