| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033 |
- /*
- * Copyright (C) 2022 The V-Gears Team
- *
- * This file is part of V-Gears
- *
- * V-Gears is free software: you can redistribute it and/or modify it under
- * terms of the GNU General Public License as published by the Free Software
- * Foundation, version 3.0 (GPLv3) of the License.
- *
- * V-Gears is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- */
- #pragma once
- #include <map>
- #include <tuple>
- #include <OgreString.h>
- #include "ScriptManager.h"
- /**
- * Any enemy in a battle.
- */
- class Enemy{
- public:
- struct Element{
- /**
- * The element ID.
- */
- unsigned int id;
- /**
- * Damage modification factor when attacked by the element.
- *
- * 1 means normal damage taken.
- * 0 means no damage taken.
- * [0-1] means reduced damage.
- * [1-10) means extended damage.
- * (-10-0) means recovery
- * >10 means death.
- * <-10 means full recovery.
- */
- float factor;
- };
- /**
- * Enemy attack data.
- */
- struct Attack{
- /**
- * Attack ID.
- */
- unsigned int id;
- /**
- * Camera ID to use during the attack.
- *
- * -1 to not move the camera.
- */
- int camera;
- /**
- * Animation script of the model to play for the attack. -1 if there is none.
- */
- int animation = -1;
- };
- /**
- * Data for drop and steal items.
- */
- struct Item{
- /**
- * Item ID.
- */
- unsigned int id;
- /**
- * Steal or drop rate.
- */
- float rate;
- };
- /**
- * Status immunity.
- */
- struct Immunity{
- /**
- * Status ID.
- */
- unsigned int status;
- /**
- * Immunity rate.
- *
- * 0 or lower means no immunity, 1 or higher completely immune. Values between 0 and 1
- * indicate resistance.
- */
- float rate;
- };
- /**
- * Constructor.
- *
- * @param[in] id Enemy ID.
- */
- Enemy(const unsigned int id);
- /**
- * Constructor.
- *
- * @param[in] id Enemy ID.
- * @param[in] pos Enemy position (x, y, z).
- * @param[in] front True to set the enemy in the front row, false for back row.
- * @param[in] visible Indicates enemy visibility.
- * @param[in] targeteable Indicates if the enemy can be targeted.
- * @param[in] active Indicates whether the enemy main script is active or not.
- * @param[in] cover Cover binary flags string.
- */
- Enemy(
- const unsigned int id, const Ogre::Vector3 pos, const bool front, const bool visible,
- const bool targeteable, const bool active, const std::string cover
- );
- /**
- * Destructor.
- */
- virtual ~Enemy();
- /**
- * Retrieves the enemy ID.
- *
- * @return The enemy ID, or -1 if it's not loaded.
- */
- const int GetId() const;
- /**
- * Sets the enemy ID.
- *
- * @param[in] id The enemy ID.
- */
- void SetId(const int id);
- /**
- * Retrieves the enemy model.
- *
- * The model name is the filename of the .mesh file, without extension.
- *
- * @return The enemy model.
- */
- const std::string GetModel() const;
- /**
- * Sets the enemy model.
- *
- * The model name must be the filename of the .mesh file, without extension.
- *
- * @param[in] model The enemy model name.
- */
- void SetModel(const std::string model);
- /**
- * Retrieves the enemy name.
- *
- * @return The enemy name.
- */
- const std::string GetName() const;
- /**
- * Sets the enemy name.
- *
- * @param[in] name The enemy name.
- */
- void SetName(const Ogre::String& name);
- /**
- * Retrieves the enemy level.
- *
- * @return The enemy level.
- */
- unsigned int GetLevel() const;
- /**
- * Sets the enemy level.
- *
- * @param[in] level The enemy level.
- */
- void SetLevel(const unsigned int level);
- /**
- * Retrieves the AP gain upon defeating the enemy.
- *
- * @return The AP gain.
- */
- unsigned int GetAp() const;
- /**
- * Sets the AP gain upon defeating the enemy.
- *
- * @param[in] ap The AP gain.
- */
- void SetAp(unsigned int ap);
- /**
- * Retrieves the EXP gain upon defeating the enemy.
- *
- * @return The EXP gain.
- */
- unsigned int GetExp() const;
- /**
- * Sets the EXP gain upon defeating the enemy.
- *
- * @param[in] exp The EXP gain.
- */
- void SetExp(const unsigned int exp);
- /**
- * Retrieves the money gain upon defeating the enemy.
- *
- * @return The money gain.
- */
- unsigned int GetMoney() const;
- /**
- * Sets the money gain upon defeating the enemy.
- *
- * @param[in] money The money gain.
- */
- void SetMoney(const unsigned int money);
- /**
- * Retrieves the enemy animation IDs.
- *
- * @return The list of animation IDs
- */
- std::vector<unsigned int> GetAnimations() const;
- /**
- * Adds an animation for the enemy.
- *
- * @param[in] animation Animation ID.
- */
- void AddAnimation(const unsigned int animation);
- /**
- * Retrieves the enemy attacks.
- *
- * @return The list of attacks.
- */
- std::vector<Attack> GetAttacks() const;
- /**
- * Adds an attack for the enemy.
- *
- * @param[in] attack Attack to add.
- */
- void AddAttack(const Attack attack);
- /**
- * Retrieves the enemy possible item drops.
- *
- * @return List of items that can be dropped by the enemy.
- */
- std::vector<Item> GetDrop() const;
- /**
- * Adds an item drop for the enemy.
- *
- * @param[in] item The dropable item.
- */
- void AddDrop(const Item item);
- /**
- * Retrieves the list of the enemy elemental affinities.
- *
- * @return The list of elemental affinities.
- */
- std::vector<Element> GetElements() const;
- /**
- * Adds an elemental affinity to the monster.
- *
- * @param[in] element Elemental affinity.
- */
- void AddElement(const Element element);
- /**
- * Retrieves the list of status immunities.
- *
- * @return The list of status immunities.
- */
- std::vector<Immunity> GetImmunities() const;
- /**
- * Adds an immunity to the monster.
- *
- * @param[in] immunity The immunity to add.
- */
- void AddImmunity(const Immunity immunity);
- /**
- * Retrieves the list of attacks that can be used during the manipulated state.
- *
- * The first attack of the list is also the attack the enemy will use when in berserkr
- * state. If the list is empty, the enemy can't be manipulated or berserkred.
- *
- * @return List of IDs of attacks usable during manipulation
- */
- std::vector<unsigned int> GetManipulateAttacks() const;
- /**
- * Adds an attack usable during manipulation.
- *
- * @param[in] attack ID of the attack.
- */
- void AddManipulateAttack(const unsigned int attack);
- /**
- * Retrieves the enemy possible item stelas.
- *
- * @return List of items that can be stolen from the enemy.
- */
- std::vector<Item> GetSteal() const;
- /**
- * Adds an item steal to the enemy.
- *
- * @param[in] item The stealableitem.
- */
- void AddSteal(const Item item);
- /**
- * Retrieves the ID of the item the monster can be morphed into.
- *
- * @return ID of the item the enemy can be morphed into, -1 if none.
- */
- unsigned int GetMorph() const;
- /**
- * Sets the ID of the item the monster can be morphed into.
- *
- * @param[in] morph ID of the item the enemy can be morphed into, -1 if none.
- */
- void SetMorph(const int morph);
- /**
- * Retrieves the multiplier for the damage the enemy receives when attacked from the back.
- *
- * @return Back attack damage multiplier.
- */
- float GetBackDamage() const;
- /**
- * Sets the multiplier for the damage the enemy receives when attacked from the back.
- *
- * @param[in] back_damage Back attack damage multiplier, 0 or positive.
- */
- void SetBackDamage(const float back_damage);
- /**
- * Retrieves the enemy's strength stat.
- *
- * @return The strength stat.
- */
- unsigned int GetStr() const;
- /**
- * Sets the enemy's strength stat.
- *
- * @param[in] str The strength stat.
- */
- void SetStr(const unsigned int str);
- /**
- * Retrieves the enemy's defense stat.
- *
- * @return The defense stat.
- */
- unsigned int GetDef() const;
- /**
- * Sets the enemy's defense stat.
- *
- * @param[in] def The defense stat.
- */
- void SetDef(const unsigned int def);
- /**
- * Retrieves the enemy's magic stat.
- *
- * @return The magic stat.
- */
- unsigned int GetMag() const;
- /**
- * Sets the enemy's magic stat.
- *
- * @param[in] mag The magic stat.
- */
- void SetMag(const unsigned int mag);
- /**
- * Retrieves the enemy's spirit stat.
- *
- * @return The spirit stat.
- */
- unsigned int GetSpr() const;
- /**
- * Sets the enemy's spirit stat.
- *
- * @param[in] spr The spirit stat.
- */
- void SetSpr(const unsigned int spr);
- /**
- * Retrieves the enemy's dexterity stat.
- *
- * @return The dexterity stat.
- */
- unsigned int GetDex() const;
- /**
- * Sets the enemy's dexterity stat.
- *
- * @param[in] dex The dexterity stat.
- */
- void SetDex(const unsigned int dex);
- /**
- * Retrieves the enemy's luck stat.
- *
- * @return The luck stat.
- */
- unsigned int GetLck() const;
- /**
- * Sets the enemy's luck stat.
- *
- * @param[in] lck The luck stat.
- */
- void SetLck(const unsigned int lck);
- /**
- * Retrieves the enemy's evasion stat.
- *
- * @return The evasion stat.
- */
- unsigned int GetEva() const;
- /**
- * Sets the enemy's evasion stat.
- *
- * @param[in] eva The evasion stat.
- */
- void SetEva(const unsigned int eva);
- /**
- * Retrieves the enemy's magic evasion stat.
- *
- * @return The magic evasion stat.
- */
- unsigned int GetMeva() const;
- /**
- * Sets the enemy's magic evasion stat.
- *
- * @param[in] meva The magic evasion stat.
- */
- void SetMeva(const unsigned int meva);
- /**
- * Retrieves the enemy's current HP.
- *
- * @return The current HP.
- */
- unsigned int GetHp() const;
- /**
- * Sets the enemy's current HP.
- *
- * If set to higher then max HP reported by {@see GetHpMax()}, it will be capped to that
- * value.
- *
- * @param[in] hp The current HP.
- */
- void SetHp(const unsigned int hp);
- /**
- * Retrieves the enemy's max HP.
- *
- * @return The max HP.
- */
- unsigned int GetHpMax() const;
- /**
- * Sets the enemy's max HP.
- *
- * If the new max HP is higher than the current HP, the current HP will be set to the new
- * max HP.
- *
- * @param[in] hp_max The max HP stat.
- */
- void SetHpMax(const unsigned int hp_max);
- /**
- * Retrieves the enemy's current MP.
- *
- * @return The current MP.
- */
- unsigned int GetMp() const;
- /**
- * Sets the enemy's current MP.
- *
- * If set to higher then max MP reported by {@see GetMpMax()}, it will be capped to that
- * value.
- *
- * @param[in] mp The current MP.
- */
- void SetMp(const unsigned int mp);
- /**
- * Retrieves the enemy's max MP.
- *
- * @return The max MP.
- */
- unsigned int GetMpMax() const;
- /**
- * Sets the enemy's max MP.
- *
- * If the new max MP is higher than the current MP, the current MP will be set to the new
- * max MP.
- *
- * @param[in] mp_max The max MP stat.
- */
- void SetMpMax(const unsigned int mp_max);
- /**
- * Retrieves the enemy position in the battlefield.
- *
- * @return The enemy position (x, y, z).
- */
- Ogre::Vector3& GetPos();
- /**
- * Sets the enemy position in the battlefield.
- *
- * @param[in] pos The enemy position (x, y, z).
- */
- void SetPos(const Ogre::Vector3 &pos);
- /**
- * Retrieves the enemy position.
- *
- * @return The X, Y and Z coordinates for Lua scripts.
- */
- std::tuple<float, float, float> ScriptGetPos() const;
- /**
- * Checks if the enemy is in the front row.
- *
- * @return True if the enemy is in the front row. false if not.
- */
- bool IsFront() const;
- /**
- * Sets the enemy in or out the front row.
- *
- * @param[in] front True to set the enemy in the front row, false for the back row.
- */
- void SetFront(bool front);
- /**
- * Checks the enemy visibility.
- *
- * @return True if the enemy is visible, false if not.
- */
- bool IsVisible() const;
- /**
- * Toggles the enemy visibility.
- *
- * @param[in] visible True to make the enemy visible, false to make it invisible.
- */
- void SetVisible(bool visible);
- /**
- * Checks whether the enemy can be targeted.
- *
- * @return True if the enemy can be targeted, false if not.
- */
- bool IsTargeteable() const;
- /**
- * Determines whether the enemy can be targeted.
- *
- * @param[in] targeteable True to allow targeting the enemy false to prevent it.
- */
- void SetTargeteable(bool targeteable);
- /**
- * Checks whether the enemy's main script is active.
- *
- * @return True if the script is active, false if not.
- */
- bool IsActive() const;
- /**
- * Activates or deactivates the enemy main script.
- *
- * @param[in] active True to activate the script, false to deactivate it.
- */
- void SetActive(bool active);
- /**
- * Retrieves the flags for enemy covering.
- *
- * {@see https://wiki.ffrtt.ru/index.php/FF7/Battle/Battle_Scenes#Binary_.22Cover_Flags.22}
- * for more info about cover flags.
- *
- * @return A string with five 0s or 1s indicating the cover flags.
- */
- std::string GetCover() const;
- /**
- * Sets the flags for enemy covering.
- *
- * {@see https://wiki.ffrtt.ru/index.php/FF7/Battle/Battle_Scenes#Binary_.22Cover_Flags.22}
- * for more info about cover flags.
- *
- * @param[in] cover A string with five 0s or 1s indicating the cover flags.
- */
- void SetCover(std::string cover);
- /**
- * Retrieves the number of attacks of the enemy.
- *
- * To be used from Lua scripts.
- *
- * @return The number of attacks.
- */
- int ScriptGetAttackCount();
- /**
- * Retrieves the number of items the enemy can drop.
- *
- * To be used from Lua scripts.
- *
- * @return The number of droppable items.
- */
- int ScriptGetDropCount() const;
- /**
- * Retrieves the number of items that can be stolen from the enemy.
- *
- * To be used from Lua scripts.
- *
- * @return The number of stealable items.
- */
- int ScriptGetStealCount() const;
- /**
- * Retrieves the ID of a stealable item.
- *
- * To be used from Lua scripts.
- *
- * @param[in] index Steal index, must be lower than reported by {@see ScriptGetStealCount}.
- * @return The item ID, -1 if the index is not valid.
- */
- int ScriptGetStealId(const unsigned int index) const;
- /**
- * Retrieves the steal rate of a stealable item.
- *
- * To be used from Lua scripts.
- *
- * @param[in] index Steal index, must be lower than reported by {@see ScriptGetStealCount}.
- * @return The steal rate, between 0 and 1. 0 if the index is not valid.
- */
- float ScriptGetStealRate(const unsigned int index) const;
- /**
- * Retrieves the animation script of an attack.
- *
- * To be used from Lua scripts.
- *
- * @param[in] index Attack index, lower than {@see ScriptGetAttackCount}.
- * @return The animation script number of the model, -1 if there is none.
- */
- int ScriptGetAttackAnimation(const unsigned int index) const;
- /**
- * Retrieves the number of elements the enemy reacts to.
- *
- * To be used from Lua scripts.
- */
- int ScriptGetElementCount() const;
- /**
- * Sets an AI script.
- *
- * @param[in] slot Script slot (0 initialization, 1 main, 2 general counter, 3 death
- * counter, 4 physical counter, 5 magic counter, 6 battle end, 7 pre-turn, 8 to 15 events).
- * @param[in] code The script bytecode.
- */
- void SetAiScript(const unsigned int slot, const std::string& code);
- /**
- * Retrieves an AI script.
- *
- * To be used from Lua scripts.
- *
- * @param[in] slot Script slot, as in {@see SetAiScript}.
- * @return The script bytecode, empty if the enemy has no script in that slot.
- */
- std::string ScriptGetAiScript(const unsigned int slot) const;
- /**
- * Retrieves the number of status immunities of the enemy.
- *
- * To be used from Lua scripts.
- */
- int ScriptGetImmunityCount() const;
- /**
- * Retrieves the status ID of an immunity (0 is death, 1 near death, 2 sleep, 3 poison...).
- *
- * To be used from Lua scripts.
- *
- * @param[in] index Index, lower than {@see ScriptGetImmunityCount}.
- * @return The status ID, -1 if the index is not valid.
- */
- int ScriptGetImmunity(const unsigned int index) const;
- /**
- * Retrieves the rate of an immunity.
- *
- * To be used from Lua scripts.
- *
- * @param[in] index Index, lower than {@see ScriptGetImmunityCount}.
- * @return The immunity rate, between 0 and 1. 0 if the index is not valid.
- */
- float ScriptGetImmunityRate(const unsigned int index) const;
- /**
- * Retrieves the element index (0 is fire, 1 ice, 2 lightning...) of an element reaction.
- *
- * To be used from Lua scripts.
- *
- * @param[in] index Index, lower than {@see ScriptGetElementCount}.
- * @return The element, -1 if the index is not valid.
- */
- int ScriptGetElement(const unsigned int index) const;
- /**
- * Retrieves the damage factor of an element reaction.
- *
- * To be used from Lua scripts.
- *
- * @param[in] index Index, lower than {@see ScriptGetElementCount}.
- * @return The factor: 1 normal, 2 double, 0.5 half, 0 nullified, negative for absorbed.
- * 1 if the index is not valid.
- */
- float ScriptGetElementFactor(const unsigned int index) const;
- /**
- * Retrieves the number of attack animations of the enemy.
- *
- * To be used from Lua scripts.
- *
- * @return The number of attack animations.
- */
- int ScriptGetAnimationCount() const;
- /**
- * Retrieves an attack animation index of the enemy.
- *
- * To be used from Lua scripts.
- *
- * @param[in] index Index in the enemy animation list, lower than
- * {@see ScriptGetAnimationCount}.
- * @return The animation number in the model (as in "XX_NN"), -1 if the index is not valid.
- */
- int ScriptGetAnimation(const unsigned int index) const;
- /**
- * Retrieves the model prefix used in the animation names (the first two characters of the
- * model name).
- *
- * To be used from Lua scripts.
- */
- std::string ScriptGetModelPrefix() const;
- /**
- * Retrieves the ID of a droppable item.
- *
- * To be used from Lua scripts.
- *
- * @param[in] index Drop index, must be lower than reported by {@see ScriptGetDropCount}.
- * @return The item ID, -1 if the index is not valid.
- */
- int ScriptGetDropId(const unsigned int index) const;
- /**
- * Retrieves the drop rate of a droppable item.
- *
- * To be used from Lua scripts.
- *
- * @param[in] index Drop index, must be lower than reported by {@see ScriptGetDropCount}.
- * @return The drop rate, between 0 and 1. 0 if the index is not valid.
- */
- float ScriptGetDropRate(const unsigned int index) const;
- /**
- * Retrieves an attack.
- *
- * To be used from Lua scripts.
- *
- * @param[in] index The index of the attack to retrieve. Must be lower than reported by
- * {@see ScriptGetAttackCount}.
- * @return The ID of the attack in the specified index, or -1 if no such attack exists.
- */
- int ScriptGetAttack(const unsigned int index);
- /**
- * Retrieves the camera for an attack.
- *
- * To be used from Lua scripts.
- *
- * @param[in] index The index of the attack to retrieve. Must be lower than reported by
- * {@see ScriptGetAttackCount}.
- * @return The ID of camera associated to the attack. -1 if no such attack exists or if it
- * doesn't have an specific camera associated.
- */
- int ScriptGetCameraForAttack(const unsigned int index);
- private:
- /**
- * Reads enemy data from the xml file.
- */
- void ReadFromXml();
- /**
- * The enemy ID.
- */
- int id_;
- /**
- * NAme of the enemy model file.
- */
- std::string model_;
- /**
- * The name of the enemy.
- */
- Ogre::String name_;
- /**
- * The enemy level.
- */
- unsigned int level_;
- /**
- * EXP given upon defeating the enemy.
- */
- unsigned int exp_;
- /**
- * AP given upon defeating the enemy.
- */
- unsigned int ap_;
- /**
- * Money given upon defeating the enemy.
- */
- unsigned int money_;
- /**
- * List of animations.
- */
- std::vector<unsigned int> animations_;
- /**
- * Elemental affinities.
- */
- std::vector<Element> elements_;
- /**
- * AI scripts by slot, as bytecode.
- */
- std::map<unsigned int, std::string> ai_scripts_;
- /**
- * Status immunities and resistances.
- */
- std::vector<Immunity> immunities_;
- /**
- * Enemy attacks.
- */
- std::vector<Attack> attacks_;
- /**
- * List of attacks that can be used while manipulated.
- *
- * The first one is also the one used in berserkr. If empty, it means the enemy can't be
- * manipulated or berserkd.
- */
- std::vector<unsigned int> manipulate_attacks_;
- /**
- * List of the items that can be stolen from the enemy.
- */
- std::vector<Item> steal_;
- /**
- * List of the items that can be dropped from the enemy.
- */
- std::vector<Item> drop_;
- /**
- * ID of the item the enemy can be morphed into. -1 if none..
- */
- int morph_;
- /**
- * Multiplier for back damage.
- */
- float back_damage_;
- /**
- * Enemy strength stat.
- */
- unsigned int str_;
- /**
- * Enemy defense stat.
- */
- unsigned int def_;
- /**
- * Enemy magic stat.
- */
- unsigned int mag_;
- /**
- * Enemy spirit stat.
- */
- unsigned int spr_;
- /**
- * Enemy dexterity stat.
- */
- unsigned int dex_;
- /**
- * Enemy luck stat.
- */
- unsigned int lck_;
- /**
- * Enemy evasion stat.
- */
- unsigned int eva_;
- /**
- * Enemy magic evasion stat.
- */
- unsigned int meva_;
- /**
- * Enemy's current HP.
- */
- unsigned int hp_;
- /**
- * Enemy's current MP.
- */
- unsigned int mp_;
- /**
- * Enemy's max HP.
- */
- unsigned int hp_max_;
- /**
- * Enemy's max MP.
- */
- unsigned int mp_max_;
- /**
- * Enemy position in the battlefield (x, y, z).
- */
- Ogre::Vector3 pos_;
- /**
- * Indicates if the enmy is in the frontline.
- */
- bool front_;
- /**
- * Indicates if the enemy is visible.
- */
- bool visible_;
- /**
- * Indicates if the enemy can be targeted.
- */
- bool targeteable_;
- /**
- * Indicates if the enemy's main script is active.
- */
- bool active_;
- /**
- * Cover binary flags.
- */
- std::string cover_;
- };
|