18 spell_line, spell_index);
19 if (spell_index_of_type)
21 spellAPI.removeDLLNode(_this, spell_index_of_type);
22 spellAPI.setEffectDone(_this, spell_index_of_type, 0);
38 spell_line,spell_index);
39 if (spell_index_of_type)
41 spellAPI.removeDLLNode(_this, spell_index_of_type);
47 spellAPI.setEffectDone(_this, spell_index_of_type, 0);
57 uint16_t target_index =
60 target_index, spell_line);
64 uint16_t spell_index_of_type =
66 target_index, spell_line,
68 if (spell_index_of_type)
70 spellAPI.removeDLLNode(_this, spell_index_of_type);
80 spellAPI.setEffectDone(_this, spell_index_of_type, 0);
91 uint16_t target_index =
94 target_index, spell_line);
98 uint16_t spell_index_of_type =
100 target_index, spell_line,
102 if (spell_index_of_type)
104 spellAPI.removeDLLNode(_this, spell_index_of_type);
114 spellAPI.setEffectDone(_this, spell_index_of_type, 0);
124 uint16_t target_index =
127 target_index, spell_line);
131 uint16_t spell_index_of_type =
133 target_index, spell_line,
135 if (spell_index_of_type)
137 spellAPI.removeDLLNode(_this, spell_index_of_type);
147 spellAPI.setEffectDone(_this, spell_index_of_type, 0);
155 uint16_t spell_index)
158 uint16_t target_index =
161 target_index, spell_line);
165 uint16_t spell_index_of_type =
167 target_index, spell_line,
169 if (spell_index_of_type)
171 spellAPI.removeDLLNode(_this, spell_index_of_type);
173 int8_t bonus = (int8_t)(-
spellAPI.getXData(_this,
177 target_index, bonus);
179 spellAPI.setEffectDone(_this, spell_index_of_type, 0);
187 uint16_t spell_index)
190 uint16_t target_index =
193 target_index, spell_line);
197 uint16_t spell_index_of_type =
199 target_index, spell_line,
201 if (spell_index_of_type)
203 spellAPI.removeDLLNode(_this, spell_index_of_type);
205 int8_t bonus = (int8_t)(-
spellAPI.getXData(_this,
209 target_index, bonus);
211 spellAPI.setEffectDone(_this, spell_index_of_type, 0);
219 uint16_t spell_index)
222 uint16_t target_index =
225 target_index, spell_line);
229 uint16_t spell_index_of_type =
231 target_index, spell_line,
233 if (spell_index_of_type)
235 spellAPI.removeDLLNode(_this, spell_index_of_type);
237 int8_t bonus = (int8_t)(-
spellAPI.getXData(_this,
241 target_index, bonus);
243 spellAPI.setEffectDone(_this, spell_index_of_type, 0);
250 uint16_t spell_index)
253 uint16_t target_index =
256 target_index, spell_line);
260 uint16_t spell_index_of_type =
262 target_index, spell_line,
264 if (spell_index_of_type)
266 spellAPI.removeDLLNode(_this, spell_index_of_type);
281 spellAPI.setEffectDone(_this, spell_index_of_type, 0);
289 uint16_t spell_index)
292 uint16_t target_index =
295 target_index, spell_line);
299 uint16_t spell_index_of_type =
301 target_index, spell_line,
303 if (spell_index_of_type)
305 spellAPI.removeDLLNode(_this, spell_index_of_type);
320 spellAPI.setEffectDone(_this, spell_index_of_type, 0);
328 uint16_t spell_index)
331 uint16_t target_index =
334 target_index, spell_line);
338 uint16_t spell_index_of_type =
340 target_index, spell_line,
342 if (spell_index_of_type)
344 spellAPI.removeDLLNode(_this, spell_index_of_type);
354 spellAPI.setEffectDone(_this, spell_index_of_type, 0);
361 uint16_t spell_index)
364 uint16_t target_index =
367 target_index, spell_line);
371 uint16_t spell_index_of_type =
373 target_index, spell_line,
375 if (spell_index_of_type)
377 spellAPI.removeDLLNode(_this, spell_index_of_type);
387 spellAPI.setEffectDone(_this, spell_index_of_type, 0);
394 uint16_t spell_index)
397 uint16_t target_index =
400 target_index, spell_line);
404 uint16_t spell_index_of_type =
406 target_index, spell_line,
408 if (spell_index_of_type)
410 spellAPI.removeDLLNode(_this, spell_index_of_type);
412 int8_t bonus = (int8_t)(-
spellAPI.getXData(_this, spell_index,
415 target_index, bonus);
417 spellAPI.setEffectDone(_this, spell_index_of_type, 0);
424 uint16_t spell_index)
427 uint16_t target_index =
430 target_index, spell_line);
434 uint16_t spell_index_of_type =
436 target_index, spell_line,
438 if (spell_index_of_type)
440 spellAPI.removeDLLNode(_this, spell_index_of_type);
443 int8_t bonus = (int8_t)(-
spellAPI.getXData(_this, spell_index,
446 target_index, bonus);
452 spellAPI.setEffectDone(_this, spell_index_of_type, 0);
467 target_index, spell_line, spell_index);
470 spellAPI.removeDLLNode(_this, spell_index2);
475 spellAPI.setEffectDone(_this, spell_index2, 0);
482 uint16_t spell_index)
491 spell_line, spell_index);
492 if (spell_index_of_type)
494 spellAPI.removeDLLNode(_this, spell_index_of_type);
504 spellAPI.setEffectDone(_this, spell_index_of_type, 0);
511 uint16_t spell_index)
514 uint16_t target_index =
517 target_index, spell_line);
521 uint16_t spell_index_of_type =
523 target_index, spell_line,
525 if (spell_index_of_type)
527 spellAPI.removeDLLNode(_this, spell_index_of_type);
535 int8_t bonus = (int8_t)(-
spellAPI.getXData(_this, spell_index,
538 target_index, bonus);
539 bonus = (int8_t)(-
spellAPI.getXData(_this, spell_index,
542 target_index, bonus);
548 spellAPI.setEffectDone(_this, spell_index_of_type, 0);
555 uint16_t spell_index)
558 uint16_t target_index =
561 target_index, spell_line);
565 uint16_t spell_index_of_type =
567 target_index, spell_line,
569 if (spell_index_of_type)
571 spellAPI.removeDLLNode(_this, spell_index_of_type);
582 spellAPI.setEffectDone(_this, spell_index_of_type, 0);
589 uint16_t spell_index)
592 uint16_t target_index =
595 target_index, spell_line);
599 uint16_t spell_index_of_type =
601 target_index, spell_line,
603 if (spell_index_of_type)
605 spellAPI.removeDLLNode(_this, spell_index_of_type);
616 spellAPI.setEffectDone(_this, spell_index_of_type, 0);
623 uint16_t spell_index)
626 uint16_t target_index =
629 target_index, spell_line);
633 uint16_t spell_index_of_type =
635 target_index, spell_line,
637 if (spell_index_of_type)
639 spellAPI.removeDLLNode(_this, spell_index_of_type);
651 spellAPI.setEffectDone(_this, spell_index_of_type, 0);
658 uint16_t spell_index)
661 uint16_t target_index =
664 target_index, spell_line);
668 uint16_t spell_index_of_type =
670 target_index, spell_line,
672 if (spell_index_of_type)
674 spellAPI.removeDLLNode(_this, spell_index_of_type);
686 spellAPI.setEffectDone(_this, spell_index_of_type, 0);
693 uint16_t spell_index)
696 uint16_t target_index =
699 target_index, spell_line);
703 uint16_t spell_index_of_type =
705 target_index, spell_line,
707 if (spell_index_of_type)
709 spellAPI.removeDLLNode(_this, spell_index_of_type);
711 int8_t bonus =
spellAPI.getXData(_this, spell_index,
713 uint16_t stat_value =
715 resistance_fire.base_val;
716 int8_t recalc_value = stat_value - ((bonus * stat_value) / 100);
725 recalc_value = stat_value - ((bonus * stat_value) / 100);
733 recalc_value = stat_value - ((bonus * stat_value) / 100);
741 recalc_value = stat_value - ((bonus * stat_value) / 100);
746 bonus =
spellAPI.getXData(_this, spell_index,
751 recalc_value = stat_value - ((bonus * stat_value) / 100);
760 recalc_value = stat_value - ((bonus * stat_value) / 100);
768 recalc_value = stat_value - ((bonus * stat_value) / 100);
773 bonus =
spellAPI.getXData(_this, spell_index,
777 resistance_black.base_val;
778 recalc_value = stat_value - ((bonus * stat_value) / 100);
787 recalc_value = stat_value - ((bonus * stat_value) / 100);
795 recalc_value = stat_value - ((bonus * stat_value) / 100);
803 recalc_value = stat_value - ((bonus * stat_value) / 100);
808 bonus =
spellAPI.getXData(_this, spell_index,
812 resistance_mental.base_val;
813 recalc_value = stat_value - ((bonus * stat_value) / 100);
822 recalc_value = stat_value - ((bonus * stat_value) / 100);
830 recalc_value = stat_value - ((bonus * stat_value) / 100);
835 spellAPI.setEffectDone(_this, spell_index_of_type, 0);
842 uint16_t spell_index)
845 uint16_t target_index =
848 target_index, spell_line);
852 uint16_t spell_index_of_type =
854 target_index, spell_line,
856 if (spell_index_of_type)
858 spellAPI.removeDLLNode(_this, spell_index_of_type);
860 int8_t bonus = (int8_t)(-
spellAPI.getXData(_this, spell_index,
863 target_index, bonus);
864 bonus = (int8_t)(-
spellAPI.getXData(_this, spell_index,
867 target_index, bonus);
868 bonus = (int8_t)(-
spellAPI.getXData(_this, spell_index,
871 target_index, bonus);
872 bonus = (int8_t)(-
spellAPI.getXData(_this, spell_index,
875 target_index, bonus);
877 spellAPI.setEffectDone(_this, spell_index_of_type, 0);
884 uint16_t spell_index)
899 if (spell_line_id == 0x94)
901 spell_line_id = 0x98;
905 spell_line_id = 0x94;
910 target_index, spell_line_id);
917 spell_line_id, spell_index);
923 spellAPI.removeDLLNode(_this, spell_line_id);
924 spellAPI.setEffectDone(_this, spell_line_id, 0);
930 uint16_t spell_index)
938 uint16_t target_index =
944 if (spell_line_id == 0x96)
946 spell_line_id = 0x9a;
950 spell_line_id = 0x96;
955 target_index, spell_line_id);
962 spell_line_id, spell_index);
968 spellAPI.removeDLLNode(_this, spell_line_id);
969 spellAPI.setEffectDone(_this, spell_line_id, 0);
975 uint16_t spell_index)
984 uint16_t target_index =
990 if (spell_line_id == 0x97)
992 spell_line_id = 0x9b;
996 spell_line_id = 0x97;
1001 target_index, spell_line_id);
1008 spell_line_id, spell_index);
1014 spellAPI.removeDLLNode(_this, spell_line_id);
1015 spellAPI.setEffectDone(_this, spell_line_id, 0);
1021 uint16_t spell_index)
1031 uint16_t target_index =
1034 bool does_figure_have_spell_on_it =
1038 if (does_figure_have_spell_on_it == 0)
1044 spell_line_id, spell_index);
1052 uint16_t spell_index)
1055 log_info(
"Domination Spell Refresh Handler Called");
1069 std::list<uint16_t> domination_spell_ids;
1074 domination_spell_ids.push_back(spell_line_id);
1081 bool hasDominationSpell =
false;
1082 for (uint16_t spell_id : domination_spell_ids)
1089 hasDominationSpell =
true;
1094 return hasDominationSpell ? 0 : 1;
1100 log_info(
"case 0xda block refresh handler called");
SpellFunctions * spellAPI
FigureFunctions * figureAPI
ToolboxFunctions * toolboxAPI
void log_info(const char *format,...)
@ SPELL_STAT_MUL_MODIFIER2
@ SPELL_STAT_MUL_MODIFIER4
@ SPELL_STAT_MUL_MODIFIER3
@ SPELL_STAT_MUL_MODIFIER
std::list< SFSpell * > g_internal_spell_list
int __thiscall endurance_refresh_handler(SF_CGdSpell *_this, uint16_t spell_index)
int __thiscall case_da_refresh_handler(SF_CGdSpell *_this, uint16_t spell_index)
int __thiscall domination_spell_refresh_handler(SF_CGdSpell *_this, uint16_t spell_index)
int __thiscall black_almightness_refresh_handler(SF_CGdSpell *_this, uint16_t spell_index)
int __thiscall enlightenment_refresh_handler(SF_CGdSpell *_this, uint16_t spell_index)
int __thiscall dexterity_refresh_handler(SF_CGdSpell *_this, uint16_t spell_index)
int __thiscall mutation_refresh_handler(SF_CGdSpell *_this, uint16_t spell_index)
int __thiscall fast_fighting_refresh_handler(SF_CGdSpell *_this, uint16_t spell_index)
int __thiscall quickness_refresh_handler(SF_CGdSpell *_this, uint16_t spell_index)
int __thiscall flexibility_refresh_handler(SF_CGdSpell *_this, uint16_t spell_index)
int __thiscall melt_resistance_refresh_handler(SF_CGdSpell *_this, uint16_t spell_index)
int __thiscall inflexibility_refresh_handler(SF_CGdSpell *_this, uint16_t spell_index)
int __thiscall warcry_berserk_refresh_handler(SF_CGdSpell *_this, uint16_t spell_index)
int __thiscall first_block_refresh_handler(SF_CGdSpell *_this, uint16_t spell_index)
int __thiscall slowness_refresh_handler(SF_CGdSpell *_this, uint16_t spell_index)
int __thiscall strength_refresh_handler(SF_CGdSpell *_this, uint16_t spell_index)
int __thiscall suffocation_refresh_handler(SF_CGdSpell *_this, uint16_t spell_index)
int __thiscall charisma_refresh_handler(SF_CGdSpell *_this, uint16_t spell_index)
int __thiscall endurance_durability_refresh_handler(SF_CGdSpell *_this, uint16_t spell_index)
int __thiscall brilliance_refresh_handler(SF_CGdSpell *_this, uint16_t spell_index)
int __thiscall eternity_refresh_handler(SF_CGdSpell *_this, uint16_t spell_index)
int __thiscall white_almightness_refresh_handler(SF_CGdSpell *_this, uint16_t spell_index)
int __thiscall chill_resistance_refresh_handler(SF_CGdSpell *_this, uint16_t spell_index)
int __thiscall patronize_shelter_refresh_handler(SF_CGdSpell *_this, uint16_t spell_index)
int __thiscall weaken_refresh_handler(SF_CGdSpell *_this, uint16_t spell_index)
int __thiscall slow_fighting_refresh_handler(SF_CGdSpell *_this, uint16_t spell_index)
int __thiscall decay_refresh_handler(SF_CGdSpell *_this, uint16_t spell_index)
int __thiscall pestilence_refresh_handler(SF_CGdSpell *_this, uint16_t spell_index)
int __thiscall inablility_refresh_handler(SF_CGdSpell *_this, uint16_t spell_index)
SF_CGdFigure * SF_CGdFigure
SF_CGdFigureToolbox * SF_CGdFigureToolBox
SF_GdSpell active_spell_list[800]