-
void_17
имя: имя
- Ветеран
-
- Сообщения: 547
- Зарегистрирован: 25 апр 2021, 15:05
- Откуда: Оттуда
- Пол:
- Поблагодарили: 131 раз.
|
void_17 » 31 май 2023, 09:32
Круто. А где сами классы? - Код: Выделить всё
class type_AI_attack_hex_chooser { public: long get_attack_time()const; long get_best_hex()const; long get_hex_value()const; type_AI_attack_hex_chooser(army const * , army const * , long const * , searchArray * , type_AI_combat_parameters const &); long get_hex_attack_value(long const , long &); long get_attack_time(pathCell const *)const; void check_adjacent_hexes(long , long , long); bool find_attack_hex();
private: const army * attacker; int speed; const army * enemy; searchArray* search_array; const int * enemy_attacks; int retaliation_strength; int our_strength; int best_value; int best_hex; int best_attack_time; type_AI_combat_parameters* estimate; };
//--------------------------------------------------------------------------- // type_AI_attack_hex_chooser class implementation //--------------------------------------------------------------------------- inline long type_AI_attack_hex_chooser::get_attack_time( )const { return best_attack_time; }
//--------------------------------------------------------------------------- //--------------------------------------------------------------------------- inline long type_AI_attack_hex_chooser::get_best_hex( )const { return best_hex; }
//--------------------------------------------------------------------------- //--------------------------------------------------------------------------- inline long type_AI_attack_hex_chooser::get_hex_value( )const { return best_value; }
struct type_enchant_data {
public:
type_enchant_data( SpellID new_spell, TSkillMastery new_mastery, int new_power, int new_duration ); int get_mastery_value(); bool valid() { return !( spell == 0 && mastery == eMasteryNone && !power ); }
public:
SpellID spell; TSkillMastery mastery; int power; int duration; bool check_resistance; };
struct type_spell_choice : type_enchant_data {
public:
type_spell_choice(); type_spell_choice(SpellID,TSkillMastery,long,long);
public:
int target_hex; int second_target_hex; int value; bool cast_now; };
struct type_AI_enemy_data { const army* enemy; int damage; int count; int total_damage; };
class type_AI_spellcaster {
protected: void initialize(combatManager *,long); public: type_AI_spellcaster(combatManager *,long,bool); virtual ~type_AI_spellcaster() // virtual destructor is used to destroy enemy_caster { if ( this->enemy_caster && this->owns_enemy_caster ) enemy_caster->~type_AI_spellcaster(); } protected: type_AI_spellcaster(type_AI_spellcaster *,combatManager *,long,bool);
bool is_last_action() const; bool should_attack_now(army const *) const; long get_damage_value(SpellID,long,hero const *,army const *) const; long get_damage_spell_value(army const *,type_enchant_data) const; long get_group_damage_value(SpellID,long,long,hero *) const; long get_mass_damage_effect(long,long) const; long get_area_effect_value(SpellID,long,TSkillMastery,long) const; void consider_area_effect(type_spell_choice &) const; long get_chain_lightning_value(long,TSkillMastery,army *) const; void consider_chain_lightning(type_spell_choice &) const; void consider_mass_damage(type_spell_choice &) const; long get_age_value(army const *,type_enchant_data) const; long get_attack_boost_value(army const *,army const *,long,long,double) const; long get_attack_boost_value(army const *,army const *,long,double) const; long get_bless_value(army const *,type_enchant_data) const; long get_frenzy_value(army const *,type_enchant_data) const; long get_attack_skill_value(army const *,army const *,long,long) const; long get_blood_lust_value(army const *,type_enchant_data) const; long get_mirth_value(army const *,type_enchant_data) const; long get_sorrow_value(army const *,type_enchant_data) const; long get_fortune_value(army const *,type_enchant_data) const; long get_defense_boost_value(army const *,army const *,long,double) const; long get_defense_skill_value(army const *,long,long) const; long get_disease_value(army const *,type_enchant_data) const; long get_prayer_value(army const *,type_enchant_data) const; long get_precision_value(army const *,type_enchant_data) const; long get_air_shield_value(army const *,type_enchant_data) const; long get_shield_value(army const *,type_enchant_data) const; long get_slayer_value(army const *,type_enchant_data) const; long get_tough_skin_value(army const *,type_enchant_data) const; long get_disruptive_ray_value(army const *,type_enchant_data) const; long get_weakness_value(army const *,type_enchant_data) const; long get_misfortune_value(army const *,type_enchant_data) const; long get_blind_value(army const *,type_enchant_data) const; long get_move_order_change_value(army const *) const; long get_muck_and_mire_value(army const *,type_enchant_data) const; long get_poison_value(army const *,type_enchant_data) const; long get_speed_value(army const *,long,long) const; long get_haste_value(army const *,type_enchant_data) const; long get_protection_value(army const *,TSpellSchool,long,long,long) const; long get_air_protection_value(army const *,type_enchant_data) const; long get_fire_protection_value(army const *,type_enchant_data) const; long get_earth_protection_value(army const *,type_enchant_data) const; long get_water_protection_value(army const *,type_enchant_data) const; double get_duration(long,bool) const; long get_cancel_value(army &,bool) const; long get_dispel_value(army const *,type_enchant_data) const; long get_cure_value(army const *,type_enchant_data) const; long get_antimagic_value(army const *,type_enchant_data) const; long get_backlash_value(army const *,type_enchant_data) const; long get_counterstrike_value(army const *,type_enchant_data) const; long get_fire_shield_value(army const *,type_enchant_data) const; long get_traitor_value(army const *,army const *) const; long get_berserk_value(army const *,type_enchant_data) const; long get_hypnotize_value(army const *,type_enchant_data) const; void consider_single_enchantment(type_spell_choice &,long) const; void consider_enchantment(type_spell_choice &,long) const; void consider_teleport(type_spell_choice &) const; void consider_resurrect(type_spell_choice &) const; void consider_sacrifice(type_spell_choice &,army const *,long) const; void consider_sacrifice(type_spell_choice &) const; long get_clone_value(army const *,type_enchant_data) const; long get_curse_value(army const *,type_enchant_data) const; long get_forgetfulness_value(army const *,type_enchant_data) const; long unimplemented(army const *,type_enchant_data) const; type_enchant_func get_enchantment_function(SpellID const)const; void consider_earthquake(type_spell_choice &) const ; void consider_summon(type_spell_choice &) const; void consider_spell(type_spell_choice &) const; void set_melee_enemies(); void set_worst_enemies(); void add_enemy(type_AI_enemy_data &,army const *,army const *,bool); void find_enemy_attacks();
public:
bool cast_spell(bool); long get_ogre_mage_value(army const *) const; long get_caliph_value(army const *) const;
protected:
void check_simulation(); bool spells_not_required() const;
public:
using type_enchant_func = decltype(unimplemented)*;
public:
hero* current_hero; hero* enemy_hero; int our_group; int enemy_group; int enemy_can_attack; int can_be_attacked; bool win_likely; bool is_creature_spell; type_AI_combat_parameters estimate; type_AI_spellcaster* enemy_caster; bool owns_enemy_caster; type_AI_enemy_data melee_enemies[20]; type_AI_enemy_data ranged_enemies[20]; type_AI_enemy_data worst_enemies[20];
};
IDA Free разрешили декомпилировать x86-код. А мне это не особо нужно. IDA 7.7 хватает за глаза, к тому же я для декомпиляции в основном MacOS-базой пользуюсь. Её в разы проще декомпилировать.
|