22 uint16_t target_index,
55 uint16_t target_index,
69 uint16_t target_index,
91 uint16_t target_index,
104 uint16_t manacost = (spell_data->
mana_cost * 3) / 2;
106 target_index) < manacost)
127 uint16_t target_index,
141 uint16_t manacost = (spell_data->
mana_cost * 3) / 2;
143 target_index) < manacost)
158 uint16_t target_index,
178 uint16_t manacost = (spell_data->
mana_cost * 3) / 2;
180 target_index) < manacost)
195 uint16_t target_index,
214 uint16_t enemy_index =
225 uint16_t manacost = (spell_data->
mana_cost * 3) / 2;
227 target_index) < manacost)
245 uint16_t target_index,
258 uint8_t figure_count = 0;
262 uint16_t ally_index =
268 ally_index, spell_line)))
272 if (figure_count > 3)
277 if (figure_count < 3)
290 uint16_t target_index,
306 uint16_t target_index,
344 uint16_t target_index,
356 uint16_t manacost = (spell_data->
mana_cost * 3) / 2;
358 target_index) < manacost)
372 uint16_t target_index, uint16_t spell_line,
383 uint8_t figure_count = 0;
387 uint16_t enemy_index =
399 if (figure_count > 2)
404 if (figure_count < 2)
413 uint16_t target_index,
439 uint16_t target_index,
453 (100 - spell_data->
params[0]))
462 uint16_t target_index,
476 uint16_t figures_count = 0;
480 uint16_t ally_index =
485 ally_index, spell_line))
492 ally_index) < (100 - spell_data->
params[0]))
505 if (figures_count < 3)
514 uint16_t target_index,
531 if (percent > (100 - spell_data->
params[1]))
540 uint16_t target_index,
569 bool should_use =
false;
571 while (figure_id != 0)
606 uint16_t target_index,
614 uint16_t target_index,
623 uint16_t target_index,
628 uint16_t current_mana =
634 uint16_t current_health =
636 uint16_t max_health =
639 if ((max_mana / 2 < current_mana) && (current_health < max_health))
641 if (current_health == 0)
653 rank = (current_health * 2 - max_health) /
654 (max_health * max_health);
666 uint16_t target_index,
673 uint16_t list_length = ((uint32_t)node.
data - (uint32_t)node.
first) >> 1;
693 uint16_t target_index,
700 uint16_t threshold = spell_data->
params[0];
704 uint16_t figure_index =
709 figure_index) < threshold)
713 &position, figure_index);
716 current_figure_pos));
738 uint16_t target_index,
743 uint16_t current_health =
745 uint16_t max_health =
748 uint16_t healing_amount = 0;
755 uint32_t *list_first;
756 uint32_t *list_current;
759 uint32_t list_length = ((uint32_t)some_list.data -
760 (uint32_t)some_list.first) >> 2;
761 if (list_length != 0)
763 list_first = some_list.first;
764 list_current = some_list.data;
765 while (list_current != list_first)
767 healing_amount += spell_data->
params[0];
771 if (current_health + healing_amount < max_health)
773 if (current_health == 0)
779 if (((max_health * 9) / 10 < current_health + healing_amount) ||
780 (current_health + healing_amount < max_health / 10))
793 uint16_t target_index, uint16_t spell_line,
811 uint16_t target_index,
833 uint16_t target_index,
838 uint16_t max_health =
841 uint16_t current_health =
843 if (current_health < max_health)
857 uint16_t target_index,
871 uint16_t target_index, uint16_t spell_line,
884 uint16_t target_index,
906 uint16_t target_index,
922 uint16_t target_index, uint16_t spell_line,
937 uint16_t target_index,
951 uint16_t target_index,
956 uint16_t current_mana =
962 if (current_mana <= (uint16_t)((max_mana * 95) / 100))
964 uint16_t target_mana =
966 uint16_t target_max_mana =
969 if ((target_max_mana / 10) > target_mana)
982 uint16_t target_index,
996 uint16_t target_index,
1011 uint16_t target_index,
1012 uint16_t spell_line,
1024 uint16_t target_index,
1025 uint16_t spell_line,
1029 bool hasAura =
false;
1033 for (uint16_t node_id =
1041 uint16_t spell_index =
1044 uint16_t spell_line =
1061 uint16_t target_index,
1062 uint16_t spell_line,
1066 bool hasAura =
false;
1070 for (uint16_t node_id =
1078 uint16_t spell_index =
1081 uint16_t spell_line =
1098 uint16_t target_index,
1099 uint16_t spell_line,
1106 uint16_t target_index,
1107 uint16_t spell_line,
1111 if ((spell_data->
params[2] <
SpellFunctions * spellAPI
FigureFunctions * figureAPI
ToolboxFunctions * toolboxAPI
IteratorFunctions iteratorAPI
uint32_t getDistance(SF_Coord *pointA, SF_Coord *pointB)
uint32_t __thiscall cure_disease_ai_handler(SF_CGdBattleDevelopment *_this, uint16_t target_index, uint16_t spell_line, SF_CGdResourceSpell *spell_data)
uint32_t __thiscall hallow_ai_handler(SF_CGdBattleDevelopment *_this, uint16_t target_index, uint16_t spell_line, SF_CGdResourceSpell *spell_data)
uint32_t __thiscall berserk_ai_handler(SF_CGdBattleDevelopment *_this, uint16_t target_index, uint16_t spell_line, SF_CGdResourceSpell *spell_data)
uint32_t __thiscall shields_ai_handler(SF_CGdBattleDevelopment *_this, uint16_t target_index, uint16_t spell_line, SF_CGdResourceSpell *spell_data)
uint32_t __thiscall death_ai_handler(SF_CGdBattleDevelopment *_this, uint16_t target_index, uint16_t spell_line, SF_CGdResourceSpell *spell_data)
uint32_t __thiscall fireburst_ai_handler(SF_CGdBattleDevelopment *_this, uint16_t target_index, uint16_t spell_line, SF_CGdResourceSpell *spell_data)
uint32_t __thiscall manatap_ai_handler(SF_CGdBattleDevelopment *_this, uint16_t target_index, uint16_t spell_line, SF_CGdResourceSpell *spell_data)
uint32_t __thiscall RCA_ability_ai_handler(SF_CGdBattleDevelopment *_this, uint16_t target_index, uint16_t spell_line, SF_CGdResourceSpell *spell_data)
uint32_t __thiscall amok_ai_handler(SF_CGdBattleDevelopment *_this, uint16_t target_index, uint16_t spell_line, SF_CGdResourceSpell *spell_data)
uint32_t __thiscall hypnotize_ai_handler(SF_CGdBattleDevelopment *_this, uint16_t target_index, uint16_t spell_line, SF_CGdResourceSpell *spell_data)
uint32_t __thiscall lifetap_ai_handler(SF_CGdBattleDevelopment *_this, uint16_t target_index, uint16_t spell_line, SF_CGdResourceSpell *spell_data)
uint32_t __thiscall do_not_cast_ai_handler(SF_CGdBattleDevelopment *_this, uint16_t target_index, uint16_t spell_line, SF_CGdResourceSpell *spell_data)
uint32_t __thiscall dispel_white_aura_ai_handler(SF_CGdBattleDevelopment *_this, uint16_t target_index, uint16_t spell_line, SF_CGdResourceSpell *spell_data)
uint32_t __thiscall befriend_ai_handler(SF_CGdBattleDevelopment *_this, uint16_t target_index, uint16_t spell_line, SF_CGdResourceSpell *spell_data)
uint32_t __thiscall healing_ai_handler(SF_CGdBattleDevelopment *_this, uint16_t target_index, uint16_t spell_line, SF_CGdResourceSpell *spell_data)
uint32_t __thiscall tower_extinct_ai_handler(SF_CGdBattleDevelopment *_this, uint16_t target_index, uint16_t spell_line, SF_CGdResourceSpell *spell_data)
uint32_t __thiscall shift_life_ai_handler(SF_CGdBattleDevelopment *_this, uint16_t target_index, uint16_t spell_line, SF_CGdResourceSpell *spell_data)
uint32_t __thiscall death_grasp_ai_handler(SF_CGdBattleDevelopment *_this, uint16_t target_index, uint16_t spell_line, SF_CGdResourceSpell *spell_data)
uint32_t __thiscall demoralization_ai_handler(SF_CGdBattleDevelopment *_this, uint16_t target_index, uint16_t spell_line, SF_CGdResourceSpell *spell_data)
uint32_t __thiscall charm_ai_handler(SF_CGdBattleDevelopment *_this, uint16_t target_index, uint16_t spell_line, SF_CGdResourceSpell *spell_data)
uint32_t __thiscall freeze_ai_handler(SF_CGdBattleDevelopment *_this, uint16_t target_index, uint16_t spell_line, SF_CGdResourceSpell *spell_data)
uint32_t __thiscall summon_ai_handler(SF_CGdBattleDevelopment *_this, uint16_t target_index, uint16_t spell_line, SF_CGdResourceSpell *spell_data)
uint32_t __thiscall riposte_ability_ai_handler(SF_CGdBattleDevelopment *_this, uint16_t target_index, uint16_t spell_line, SF_CGdResourceSpell *spell_data)
uint32_t __thiscall default_support_ai_handler(SF_CGdBattleDevelopment *_this, uint16_t target_index, uint16_t spell_line, SF_CGdResourceSpell *spell_data)
uint32_t __thiscall cure_poison_ai_handler(SF_CGdBattleDevelopment *_this, uint16_t target_index, uint16_t spell_line, SF_CGdResourceSpell *spell_data)
uint32_t __thiscall dispel_black_aura_ai_handler(SF_CGdBattleDevelopment *_this, uint16_t target_index, uint16_t spell_line, SF_CGdResourceSpell *spell_data)
uint32_t __thiscall sacrifice_mana_ai_handler(SF_CGdBattleDevelopment *_this, uint16_t target_index, uint16_t spell_line, SF_CGdResourceSpell *spell_data)
uint32_t __thiscall offensive_aura_ai_handler(SF_CGdBattleDevelopment *_this, uint16_t target_index, uint16_t spell_line, SF_CGdResourceSpell *spell_data)
uint32_t __thiscall HCA_ability_ai_handler(SF_CGdBattleDevelopment *_this, uint16_t target_index, uint16_t spell_line, SF_CGdResourceSpell *spell_data)
uint32_t __thiscall critical_hits_ai_handler(SF_CGdBattleDevelopment *_this, uint16_t target_index, uint16_t spell_line, SF_CGdResourceSpell *spell_data)
uint32_t __thiscall wave_ai_handler(SF_CGdBattleDevelopment *_this, uint16_t target_index, uint16_t spell_line, SF_CGdResourceSpell *spell_data)
uint32_t __thiscall dominate_ai_handler(SF_CGdBattleDevelopment *_this, uint16_t target_index, uint16_t spell_line, SF_CGdResourceSpell *spell_data)
uint32_t __thiscall petrify_ai_handler(SF_CGdBattleDevelopment *_this, uint16_t target_index, uint16_t spell_line, SF_CGdResourceSpell *spell_data)
uint32_t __thiscall defensive_aura_ai_handler(SF_CGdBattleDevelopment *_this, uint16_t target_index, uint16_t spell_line, SF_CGdResourceSpell *spell_data)
uint32_t __thiscall blessing_ai_handler(SF_CGdBattleDevelopment *_this, uint16_t target_index, uint16_t spell_line, SF_CGdResourceSpell *spell_data)
uint32_t __thiscall healing_aura_ai_handler(SF_CGdBattleDevelopment *_this, uint16_t target_index, uint16_t spell_line, SF_CGdResourceSpell *spell_data)
uint32_t __thiscall extinct_ai_handler(SF_CGdBattleDevelopment *_this, uint16_t target_index, uint16_t spell_line, SF_CGdResourceSpell *spell_data)
uint32_t __thiscall benefactions_ai_handler(SF_CGdBattleDevelopment *_this, uint16_t target_index, uint16_t spell_line, SF_CGdResourceSpell *spell_data)
uint32_t __thiscall default_offensive_ai_handler(SF_CGdBattleDevelopment *_this, uint16_t target_index, uint16_t spell_line, SF_CGdResourceSpell *spell_data)
uint32_t __thiscall confuse_ai_handler(SF_CGdBattleDevelopment *_this, uint16_t target_index, uint16_t spell_line, SF_CGdResourceSpell *spell_data)
uint32_t __thiscall aura_light_ai_handler(SF_CGdBattleDevelopment *_this, uint16_t target_index, uint16_t spell_line, SF_CGdResourceSpell *spell_data)
AutoClass60_data data[500]
uint32_t figures_missing_hp
SF_CGdTargetData current_source_maybe
uint32_t current_target_level_possibly
SF_Coord current_figure_pos
SF_CGdFigureToolbox * CGdFigureToolBox
ushort_list_node another_figure_list[2000]
AutoClass60 enemy_figures
disposeFigureIterator_ptr disposeFigureIterator
getNextFigure_ptr getNextFigure
figureIteratorSetPointers_ptr figureIteratorSetPointers
iteratorSetArea_ptr iteratorSetArea
figureIteratorInit_ptr figureIteratorInit
High-level structure managing AI battle development.
CGdAIBattleData battleData
uint8_t skill_requirements[12]
getSpellLine_ptr getSpellLine
Retrieves the spell type ID of a given spell.
hasSpellTag_ptr hasSpellTag
Checks if a spell has a specific tag.
Represents a node in a list of unsigned short values.