2020-01-31 19:34:47 +01:00
|
|
|
/*
|
|
|
|
Copyright (c) 2019-2020 Péter Magyar
|
|
|
|
|
|
|
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
|
|
of this software and associated documentation files (the "Software"), to deal
|
|
|
|
in the Software without restriction, including without limitation the rights
|
|
|
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
|
|
copies of the Software, and to permit persons to whom the Software is
|
|
|
|
furnished to do so, subject to the following conditions:
|
|
|
|
|
|
|
|
The above copyright notice and this permission notice shall be included in all
|
|
|
|
copies or substantial portions of the Software.
|
|
|
|
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
|
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
|
|
SOFTWARE.
|
|
|
|
*/
|
|
|
|
|
2019-04-20 14:02:55 +02:00
|
|
|
#ifndef SPELL_H
|
|
|
|
#define SPELL_H
|
|
|
|
|
|
|
|
#include "core/resource.h"
|
2019-05-30 00:26:02 +02:00
|
|
|
#include "scene/resources/texture.h"
|
2019-04-20 14:02:55 +02:00
|
|
|
|
2020-02-03 13:01:17 +01:00
|
|
|
#include "../../entity_enums.h"
|
|
|
|
#include "../../spell_enums.h"
|
2019-04-20 14:02:55 +02:00
|
|
|
|
2020-02-03 13:01:17 +01:00
|
|
|
#include "../../infos/spell_cast_info.h"
|
2019-04-20 14:02:55 +02:00
|
|
|
|
2020-02-03 13:01:17 +01:00
|
|
|
#include "../../entities/entity.h"
|
|
|
|
#include "../../entities/stats/stat.h"
|
2019-04-20 14:02:55 +02:00
|
|
|
|
2020-02-03 13:01:17 +01:00
|
|
|
#include "../../infos/aura_infos.h"
|
2019-04-20 14:02:55 +02:00
|
|
|
|
2019-08-26 20:10:26 +02:00
|
|
|
#include "spell_effect_visual.h"
|
2019-12-09 21:23:57 +01:00
|
|
|
|
2019-04-20 14:02:55 +02:00
|
|
|
class Entity;
|
|
|
|
class Aura;
|
|
|
|
class SpellCastInfo;
|
|
|
|
class Spell;
|
2019-10-07 18:29:25 +02:00
|
|
|
class CraftRecipe;
|
2019-12-01 00:24:38 +01:00
|
|
|
class EntityResourceCostData;
|
2019-12-01 18:00:09 +01:00
|
|
|
class EntitySkillData;
|
2020-03-10 15:32:16 +01:00
|
|
|
class SpellDamageInfo;
|
|
|
|
class SpellHealInfo;
|
2019-04-20 14:02:55 +02:00
|
|
|
|
|
|
|
enum TargetRelationType {
|
2019-06-24 13:12:33 +02:00
|
|
|
TARGET_SELF = 1 << 0,
|
|
|
|
TARGET_ENEMY = 1 << 1,
|
|
|
|
TARGET_FRIENDLY = 1 << 2
|
2019-04-20 14:02:55 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
VARIANT_ENUM_CAST(TargetRelationType);
|
|
|
|
|
|
|
|
enum SpellTargetType {
|
|
|
|
SPELL_TARGET_TYPE_SELF,
|
|
|
|
SPELL_TARGET_TYPE_TARGET,
|
|
|
|
SPELL_TARGET_TYPE_AROUND,
|
|
|
|
SPELL_TARGET_TYPE_FRONT,
|
|
|
|
SPELL_TARGET_TYPE_AROUND_TARGET
|
|
|
|
};
|
|
|
|
|
|
|
|
VARIANT_ENUM_CAST(SpellTargetType);
|
|
|
|
|
|
|
|
enum SpellAOETargetType {
|
|
|
|
SPELL_AOE_TARGET_TYPE_CASTER,
|
|
|
|
SPELL_AOE_TARGET_TYPE_TARGET,
|
|
|
|
SPELL_AOE_TARGET_TYPE_GOUND_TARGET_SELECTION,
|
|
|
|
SPELL_AOE_TARGET_TYPE_RANDOM
|
|
|
|
};
|
|
|
|
|
|
|
|
VARIANT_ENUM_CAST(SpellAOETargetType);
|
|
|
|
|
|
|
|
class Spell : public Resource {
|
|
|
|
GDCLASS(Spell, Resource);
|
|
|
|
|
|
|
|
public:
|
2020-01-31 18:06:43 +01:00
|
|
|
int get_id() const;
|
|
|
|
void set_id(const int value);
|
2019-04-20 14:02:55 +02:00
|
|
|
|
2020-01-31 18:06:43 +01:00
|
|
|
int get_spell_type() const;
|
|
|
|
void set_spell_type(const int value);
|
2019-04-20 14:02:55 +02:00
|
|
|
|
2020-01-31 18:06:43 +01:00
|
|
|
SpellEnums::SpellCategory get_spell_category() const;
|
|
|
|
void set_spell_category(const SpellEnums::SpellCategory value);
|
2019-09-12 23:06:24 +02:00
|
|
|
|
2020-01-31 18:06:43 +01:00
|
|
|
bool get_hide_from_actionbar() const;
|
|
|
|
void set_hide_from_actionbar(const bool value);
|
2019-04-20 14:02:55 +02:00
|
|
|
|
2020-01-31 18:06:43 +01:00
|
|
|
float get_cooldown() const;
|
|
|
|
void set_cooldown(const float value);
|
2019-04-20 14:02:55 +02:00
|
|
|
|
2020-01-31 18:06:43 +01:00
|
|
|
SpellTargetType get_target_type() const;
|
|
|
|
void set_target_type(const SpellTargetType value);
|
2019-04-20 14:02:55 +02:00
|
|
|
|
2020-01-31 18:06:43 +01:00
|
|
|
TargetRelationType get_target_relation_type() const;
|
|
|
|
void set_target_relation_type(const TargetRelationType value);
|
2019-06-24 13:12:33 +02:00
|
|
|
|
2020-01-31 18:06:43 +01:00
|
|
|
int get_level() const;
|
|
|
|
void set_level(const int value);
|
2019-04-20 14:02:55 +02:00
|
|
|
|
2020-01-31 18:06:43 +01:00
|
|
|
int get_rank() const;
|
|
|
|
void set_rank(const int value);
|
2019-05-30 00:26:02 +02:00
|
|
|
|
2020-01-31 18:06:43 +01:00
|
|
|
bool get_scale_with_level() const;
|
|
|
|
void set_scale_with_level(const bool value);
|
2019-12-29 01:58:25 +01:00
|
|
|
|
2020-01-06 14:29:13 +01:00
|
|
|
Ref<ItemTemplate> get_item_cost();
|
2020-01-31 18:06:43 +01:00
|
|
|
void set_item_cost(const Ref<ItemTemplate> &value);
|
2019-04-20 14:02:55 +02:00
|
|
|
|
2020-01-06 14:29:13 +01:00
|
|
|
Ref<ItemTemplate> get_required_item();
|
2020-01-31 18:06:43 +01:00
|
|
|
void set_required_item(const Ref<ItemTemplate> &value);
|
2019-04-20 14:02:55 +02:00
|
|
|
|
2019-12-01 00:24:38 +01:00
|
|
|
Ref<EntityResourceCostData> get_resource_cost();
|
2020-01-31 18:06:43 +01:00
|
|
|
void set_resource_cost(const Ref<EntityResourceCostData> &value);
|
2019-04-20 14:02:55 +02:00
|
|
|
|
2019-12-01 00:24:38 +01:00
|
|
|
Ref<EntityResourceCostData> get_resource_give();
|
2020-01-31 18:06:43 +01:00
|
|
|
void set_resource_give(const Ref<EntityResourceCostData> &value);
|
2019-04-20 14:02:55 +02:00
|
|
|
|
2020-01-31 18:06:43 +01:00
|
|
|
bool get_global_cooldown_enabled() const;
|
|
|
|
void set_global_cooldown_enabled(const bool value);
|
2019-04-20 14:02:55 +02:00
|
|
|
|
2020-01-31 18:06:43 +01:00
|
|
|
bool get_is_local_spell() const;
|
|
|
|
void set_is_local_spell(const bool value);
|
2019-04-20 14:02:55 +02:00
|
|
|
|
2019-05-29 20:03:41 +02:00
|
|
|
Ref<Texture> get_icon();
|
2020-01-31 18:06:43 +01:00
|
|
|
void set_icon(const Ref<Texture> &value);
|
2019-04-20 14:02:55 +02:00
|
|
|
|
2020-02-26 13:05:57 +01:00
|
|
|
String get_text_translation_key() const;
|
|
|
|
void set_text_translation_key(const String &value);
|
|
|
|
|
2020-01-31 18:06:43 +01:00
|
|
|
String get_text_description() const;
|
2020-02-26 13:05:57 +01:00
|
|
|
void set_text_description(const String &value);
|
2019-04-20 14:02:55 +02:00
|
|
|
|
2019-08-26 20:10:26 +02:00
|
|
|
Ref<SpellEffectVisual> get_visual_spell_effects();
|
2020-01-31 18:06:43 +01:00
|
|
|
void set_visual_spell_effects(const Ref<SpellEffectVisual> &value);
|
2019-08-26 20:10:26 +02:00
|
|
|
|
2019-10-07 18:29:25 +02:00
|
|
|
Ref<CraftRecipe> get_teaches_craft_recipe();
|
2020-01-31 18:06:43 +01:00
|
|
|
void set_teaches_craft_recipe(const Ref<CraftRecipe> &value);
|
2019-10-07 18:29:25 +02:00
|
|
|
|
2019-09-12 23:28:18 +02:00
|
|
|
//Caster Aura Apply
|
2020-01-31 18:06:43 +01:00
|
|
|
int get_num_caster_aura_applys() const;
|
|
|
|
void set_num_caster_aura_applys(const int value);
|
2019-09-12 23:28:18 +02:00
|
|
|
|
2020-01-31 18:06:43 +01:00
|
|
|
Ref<Aura> get_caster_aura_apply(const int index);
|
|
|
|
void set_caster_aura_apply(const int index, const Ref<Aura> &caster_aura_apply);
|
2019-09-12 23:28:18 +02:00
|
|
|
|
|
|
|
Vector<Variant> get_caster_aura_applys();
|
|
|
|
void set_caster_aura_applys(const Vector<Variant> &caster_aura_applys);
|
|
|
|
|
|
|
|
//Target Aura Apply
|
2020-01-31 18:06:43 +01:00
|
|
|
int get_num_target_aura_applys() const;
|
|
|
|
void set_num_target_aura_applys(const int value);
|
2019-09-12 23:28:18 +02:00
|
|
|
|
2020-01-31 18:06:43 +01:00
|
|
|
Ref<Aura> get_target_aura_apply(const int index);
|
|
|
|
void set_target_aura_apply(const int index, const Ref<Aura> &target_aura_apply);
|
2019-09-12 23:28:18 +02:00
|
|
|
|
|
|
|
Vector<Variant> get_target_aura_applys();
|
|
|
|
void set_target_aura_applys(const Vector<Variant> &target_aura_applys);
|
|
|
|
|
|
|
|
//Apply Auras On Learn
|
2020-01-31 18:06:43 +01:00
|
|
|
int get_num_on_learn_auras() const;
|
|
|
|
void set_num_on_learn_auras(const int value);
|
2019-09-12 23:28:18 +02:00
|
|
|
|
2020-01-31 18:06:43 +01:00
|
|
|
Ref<Aura> get_on_learn_aura(const int index);
|
|
|
|
void set_on_learn_aura(const int index, const Ref<Aura> &on_learn_aura);
|
2019-09-12 23:28:18 +02:00
|
|
|
|
|
|
|
Vector<Variant> get_on_learn_auras();
|
|
|
|
void set_on_learn_auras(const Vector<Variant> &on_learn_auras);
|
|
|
|
|
|
|
|
//Range
|
2020-01-31 18:06:43 +01:00
|
|
|
bool get_range_enabled() const;
|
|
|
|
void set_range_enabled(const bool value);
|
2019-04-20 14:02:55 +02:00
|
|
|
|
2020-01-31 18:06:43 +01:00
|
|
|
float get_range() const;
|
|
|
|
void set_range(const float value);
|
2019-04-20 14:02:55 +02:00
|
|
|
|
2020-01-31 18:06:43 +01:00
|
|
|
bool get_cast_time_enabled() const;
|
|
|
|
void set_cast_time_enabled(const bool value);
|
2019-04-20 14:02:55 +02:00
|
|
|
|
2020-01-31 18:06:43 +01:00
|
|
|
float get_cast_time() const;
|
|
|
|
void set_cast_time(const float value);
|
2019-04-20 14:02:55 +02:00
|
|
|
|
2020-04-07 02:10:10 +02:00
|
|
|
//Delay
|
|
|
|
bool delay_get_use_time() const;
|
|
|
|
void delay_set_use_time(const bool value);
|
|
|
|
|
|
|
|
float delay_get_time() const;
|
|
|
|
void delay_set_time(const float value);
|
|
|
|
|
|
|
|
bool delay_get_use_speed() const;
|
|
|
|
void delay_set_use_speed(const bool value);
|
|
|
|
|
|
|
|
float delay_get_speed() const;
|
|
|
|
void delay_set_speed(const float value);
|
|
|
|
|
|
|
|
Ref<PackedScene> delay_get_scene() const;
|
|
|
|
void delay_set_scene(const Ref<PackedScene> &value);
|
|
|
|
|
|
|
|
//Damage
|
2020-01-31 18:06:43 +01:00
|
|
|
bool get_damage_enabled() const;
|
|
|
|
void set_damage_enabled(const bool value);
|
2019-04-20 14:02:55 +02:00
|
|
|
|
2020-01-31 18:06:43 +01:00
|
|
|
int get_damage_type() const;
|
|
|
|
void set_damage_type(const int value);
|
2019-04-20 14:02:55 +02:00
|
|
|
|
2020-01-31 18:06:43 +01:00
|
|
|
int get_damage_min() const;
|
|
|
|
void set_damage_min(const int value);
|
2019-04-20 14:02:55 +02:00
|
|
|
|
2020-01-31 18:06:43 +01:00
|
|
|
int get_damage_max() const;
|
|
|
|
void set_damage_max(const int value);
|
2019-04-20 14:02:55 +02:00
|
|
|
|
2020-01-31 18:06:43 +01:00
|
|
|
Stat::StatId get_damage_scale_stat() const;
|
|
|
|
void set_damage_scale_stat(const Stat::StatId value);
|
2019-04-20 14:02:55 +02:00
|
|
|
|
2020-01-31 18:06:43 +01:00
|
|
|
float get_damage_scale_coeff() const;
|
|
|
|
void set_damage_scale_coeff(const float value);
|
2019-12-29 01:58:25 +01:00
|
|
|
|
2020-01-31 18:06:43 +01:00
|
|
|
bool get_heal_enabled() const;
|
|
|
|
void set_heal_enabled(const bool value);
|
2019-04-20 14:02:55 +02:00
|
|
|
|
2020-01-31 18:06:43 +01:00
|
|
|
int get_heal_min() const;
|
|
|
|
void set_heal_min(const int value);
|
2019-04-20 14:02:55 +02:00
|
|
|
|
2020-01-31 18:06:43 +01:00
|
|
|
int get_heal_max() const;
|
|
|
|
void set_heal_max(const int value);
|
2019-04-20 14:02:55 +02:00
|
|
|
|
2020-01-31 18:06:43 +01:00
|
|
|
Stat::StatId get_heal_scale_stat() const;
|
|
|
|
void set_heal_scale_stat(const Stat::StatId value);
|
2019-12-29 01:58:25 +01:00
|
|
|
|
2020-01-31 18:06:43 +01:00
|
|
|
float get_heal_scale_coeff() const;
|
|
|
|
void set_heal_scale_coeff(const float value);
|
2019-12-29 01:58:25 +01:00
|
|
|
|
|
|
|
//Dispells
|
2020-01-31 18:06:43 +01:00
|
|
|
bool get_dispell_enabled() const;
|
|
|
|
void set_dispell_enabled(const bool value);
|
2019-12-29 01:58:25 +01:00
|
|
|
|
2020-01-31 18:06:43 +01:00
|
|
|
int get_dispell_count_min() const;
|
|
|
|
void set_dispell_count_min(const int value);
|
2019-04-20 14:02:55 +02:00
|
|
|
|
2020-01-31 18:06:43 +01:00
|
|
|
int get_dispell_count_max() const;
|
|
|
|
void set_dispell_count_max(const int value);
|
2019-12-29 01:58:25 +01:00
|
|
|
|
2020-01-31 18:06:43 +01:00
|
|
|
int get_dispell_aura_types() const;
|
|
|
|
void set_dispell_aura_types(const int value);
|
2019-12-29 01:58:25 +01:00
|
|
|
|
|
|
|
//Target
|
2020-01-31 18:06:43 +01:00
|
|
|
bool get_needs_target() const;
|
|
|
|
void set_needs_target(const bool value);
|
2019-04-20 14:02:55 +02:00
|
|
|
|
2020-01-31 18:06:43 +01:00
|
|
|
bool get_can_move_while_casting() const;
|
|
|
|
void set_can_move_while_casting(const bool value);
|
2019-04-20 14:02:55 +02:00
|
|
|
|
2020-01-31 18:06:43 +01:00
|
|
|
bool get_interrupt_enabled() const;
|
|
|
|
void set_interrupt_enabled(const bool value);
|
2019-04-20 14:02:55 +02:00
|
|
|
|
2020-01-31 18:06:43 +01:00
|
|
|
float get_interrupt_time() const;
|
|
|
|
void set_interrupt_time(const float value);
|
2019-04-20 14:02:55 +02:00
|
|
|
|
2019-12-13 09:35:14 +01:00
|
|
|
//AOE
|
2020-01-31 18:06:43 +01:00
|
|
|
bool get_is_aoe() const;
|
|
|
|
void set_is_aoe(const bool value);
|
2019-04-20 14:02:55 +02:00
|
|
|
|
2020-01-31 18:06:43 +01:00
|
|
|
SpellAOETargetType get_aoe_target_type() const;
|
|
|
|
void set_aoe_target_type(const SpellAOETargetType value);
|
2019-04-20 14:02:55 +02:00
|
|
|
|
2020-01-31 18:06:43 +01:00
|
|
|
SpellEnums::ColliderType get_aoe_collider_type() const;
|
|
|
|
void set_aoe_collider_type(const SpellEnums::ColliderType value);
|
2019-04-20 14:02:55 +02:00
|
|
|
|
2020-01-31 18:06:43 +01:00
|
|
|
float get_aoe_radius() const;
|
|
|
|
void set_aoe_radius(const float value);
|
2019-04-20 14:02:55 +02:00
|
|
|
|
2020-01-31 18:06:43 +01:00
|
|
|
Vector3 get_aoe_box_extents() const;
|
|
|
|
void set_aoe_box_extents(const Vector3 value);
|
2019-04-20 14:02:55 +02:00
|
|
|
|
2020-01-31 18:06:43 +01:00
|
|
|
int get_spell_cooldown_mainpulation_data_count() const;
|
|
|
|
void set_spell_cooldown_mainpulation_data_count(const int value);
|
2019-04-20 14:02:55 +02:00
|
|
|
|
2020-01-31 18:06:43 +01:00
|
|
|
int get_training_cost() const;
|
2019-09-12 23:43:53 +02:00
|
|
|
void set_training_cost(int value);
|
|
|
|
|
|
|
|
Ref<Spell> get_training_required_spell();
|
2020-01-31 18:06:43 +01:00
|
|
|
void set_training_required_spell(const Ref<Spell> &spell);
|
2019-09-12 23:43:53 +02:00
|
|
|
|
2019-12-01 18:00:09 +01:00
|
|
|
Ref<EntitySkillData> get_training_required_skill();
|
2020-01-31 18:06:43 +01:00
|
|
|
void set_training_required_skill(const Ref<EntitySkillData> &skill);
|
2019-09-12 23:43:53 +02:00
|
|
|
|
2020-01-31 18:06:43 +01:00
|
|
|
int get_training_required_skill_level() const;
|
|
|
|
void set_training_required_skill_level(const int value);
|
2019-09-12 23:43:53 +02:00
|
|
|
|
2019-04-20 14:02:55 +02:00
|
|
|
//// Spell Script ////
|
|
|
|
|
|
|
|
float PLAYER_HIT_RADIUS;
|
|
|
|
|
2019-05-03 23:19:10 +02:00
|
|
|
//Commands, c++ only
|
|
|
|
void sstart_casting_simple(Entity *caster, float spell_scale);
|
|
|
|
void sinterrupt_cast_simple(Entity *caster);
|
|
|
|
void sstart_casting_triggered_simple(Entity *caster);
|
|
|
|
|
|
|
|
//Commands
|
|
|
|
void sstart_casting(Ref<SpellCastInfo> info);
|
|
|
|
void sstart_casting_triggered(Ref<SpellCastInfo> info);
|
|
|
|
void sinterrupt_cast(Ref<SpellCastInfo> info);
|
|
|
|
void sfinish_cast(Ref<SpellCastInfo> info);
|
|
|
|
|
|
|
|
//eventhandlers
|
2019-05-30 00:26:02 +02:00
|
|
|
void son_cast_player_moved(Ref<SpellCastInfo> info);
|
2019-05-03 23:19:10 +02:00
|
|
|
void son_cast_damage_received(Ref<SpellCastInfo> info);
|
|
|
|
void son_spell_hit(Ref<SpellCastInfo> info);
|
2019-12-12 16:44:43 +01:00
|
|
|
void son_physics_process(Ref<SpellCastInfo> info, float delta);
|
2019-05-03 23:19:10 +02:00
|
|
|
|
|
|
|
//Clientside Event Handlers
|
|
|
|
void con_spell_cast_started(Ref<SpellCastInfo> info);
|
|
|
|
void con_spell_cast_success(Ref<SpellCastInfo> info);
|
|
|
|
void con_spell_cast_failed(Ref<SpellCastInfo> info);
|
|
|
|
void con_spell_cast_ended(Ref<SpellCastInfo> info);
|
|
|
|
void con_spell_cast_interrupted(Ref<SpellCastInfo> info);
|
|
|
|
|
|
|
|
//Calculations / Queries
|
2019-05-02 02:18:44 +02:00
|
|
|
void calculate_initial_damage(Ref<SpellDamageInfo> data);
|
|
|
|
void handle_spell_damage(Ref<SpellDamageInfo> data);
|
|
|
|
|
2020-03-10 15:32:16 +01:00
|
|
|
void calculate_initial_heal(Ref<SpellHealInfo> data);
|
|
|
|
void handle_spell_heal(Ref<SpellHealInfo> data);
|
|
|
|
|
2020-02-01 02:37:10 +01:00
|
|
|
void handle_projectile(Ref<SpellCastInfo> info);
|
2020-01-02 00:14:29 +01:00
|
|
|
void handle_effect(Ref<SpellCastInfo> info);
|
|
|
|
|
2020-02-01 02:37:10 +01:00
|
|
|
void handle_gcd(Ref<SpellCastInfo> info);
|
|
|
|
void handle_cooldown(Ref<SpellCastInfo> info);
|
|
|
|
|
2020-02-26 13:05:57 +01:00
|
|
|
String get_name_translated() const;
|
|
|
|
String get_description(const int class_level, const int character_level);
|
2020-02-26 16:49:52 +01:00
|
|
|
String _get_description(const int class_level, const int character_level);
|
2020-02-01 02:37:10 +01:00
|
|
|
|
|
|
|
Spell();
|
|
|
|
~Spell();
|
|
|
|
|
|
|
|
protected:
|
2020-01-02 00:14:29 +01:00
|
|
|
virtual void _sstart_casting(Ref<SpellCastInfo> info);
|
|
|
|
virtual void _sfinish_cast(Ref<SpellCastInfo> info);
|
|
|
|
|
|
|
|
virtual void _son_cast_player_moved(Ref<SpellCastInfo> info);
|
|
|
|
virtual void _son_spell_hit(Ref<SpellCastInfo> info);
|
|
|
|
|
2019-05-02 02:18:44 +02:00
|
|
|
virtual void _calculate_initial_damage(Ref<SpellDamageInfo> data);
|
|
|
|
virtual void _handle_spell_damage(Ref<SpellDamageInfo> data);
|
|
|
|
|
2020-03-10 15:32:16 +01:00
|
|
|
virtual void _calculate_initial_heal(Ref<SpellHealInfo> data);
|
|
|
|
virtual void _handle_spell_heal(Ref<SpellHealInfo> data);
|
|
|
|
|
2020-02-01 02:37:10 +01:00
|
|
|
virtual void _handle_projectile(Ref<SpellCastInfo> info);
|
2020-01-02 00:14:29 +01:00
|
|
|
virtual void _handle_effect(Ref<SpellCastInfo> info);
|
|
|
|
|
2019-04-20 14:02:55 +02:00
|
|
|
static void _bind_methods();
|
|
|
|
|
|
|
|
private:
|
2019-10-19 12:47:30 +02:00
|
|
|
int _id;
|
2019-04-20 14:02:55 +02:00
|
|
|
int _spell_type;
|
2019-09-12 23:06:24 +02:00
|
|
|
SpellEnums::SpellCategory _spell_category;
|
2019-04-20 14:02:55 +02:00
|
|
|
|
|
|
|
bool _hide_from_actionbar;
|
|
|
|
float _cooldown;
|
|
|
|
SpellTargetType _target_type;
|
2019-06-24 13:12:33 +02:00
|
|
|
TargetRelationType _target_relation_type;
|
2019-04-20 14:02:55 +02:00
|
|
|
|
2019-09-12 23:28:18 +02:00
|
|
|
Vector<Ref<Aura> > _caster_aura_applys;
|
|
|
|
Vector<Ref<Aura> > _target_aura_applys;
|
|
|
|
Vector<Ref<Aura> > _on_learn_auras;
|
2019-04-20 14:02:55 +02:00
|
|
|
|
|
|
|
int _level;
|
2019-05-30 00:26:02 +02:00
|
|
|
int _rank;
|
2020-01-09 04:27:19 +01:00
|
|
|
|
2019-12-29 01:58:25 +01:00
|
|
|
bool _scale_with_level;
|
2020-01-06 14:29:13 +01:00
|
|
|
|
|
|
|
Ref<ItemTemplate> _item_cost;
|
|
|
|
Ref<ItemTemplate> _required_item;
|
2019-12-01 00:24:38 +01:00
|
|
|
|
|
|
|
Ref<EntityResourceCostData> _resource_cost;
|
|
|
|
Ref<EntityResourceCostData> _resource_give;
|
|
|
|
|
2019-12-29 01:58:25 +01:00
|
|
|
bool _global_cooldown_enabled;
|
2019-04-20 14:02:55 +02:00
|
|
|
bool _is_local_spell;
|
|
|
|
Ref<Texture> _icon;
|
2019-10-19 12:12:09 +02:00
|
|
|
|
2020-02-26 13:05:57 +01:00
|
|
|
String _text_translation_key;
|
2019-10-19 12:12:09 +02:00
|
|
|
String _text_description;
|
2019-04-20 14:02:55 +02:00
|
|
|
|
2019-08-26 20:10:26 +02:00
|
|
|
Ref<SpellEffectVisual> _visual_spell_effects;
|
2019-12-09 21:23:57 +01:00
|
|
|
|
2019-10-07 18:29:25 +02:00
|
|
|
Ref<CraftRecipe> _teaches_craft_recipe;
|
2019-08-26 20:10:26 +02:00
|
|
|
|
2019-12-29 01:58:25 +01:00
|
|
|
bool _range_enabled;
|
2019-04-20 14:02:55 +02:00
|
|
|
float _range;
|
|
|
|
|
2020-04-07 02:10:10 +02:00
|
|
|
//Delay
|
|
|
|
bool _delay_use_time;
|
|
|
|
float _delay_time;
|
|
|
|
bool _delay_use_speed;
|
|
|
|
float _delay_speed;
|
|
|
|
Ref<PackedScene> _delay_scene;
|
|
|
|
|
2019-12-29 01:58:25 +01:00
|
|
|
bool _damage_enabled;
|
2019-04-20 14:02:55 +02:00
|
|
|
int _damage_type;
|
|
|
|
int _damage_min;
|
|
|
|
int _damage_max;
|
2019-12-29 01:58:25 +01:00
|
|
|
Stat::StatId _damage_scale_stat;
|
|
|
|
float _damage_scale_coeff;
|
2019-04-20 14:02:55 +02:00
|
|
|
|
2019-12-29 01:58:25 +01:00
|
|
|
bool _heal_enabled;
|
2019-04-20 14:02:55 +02:00
|
|
|
int _heal_min;
|
|
|
|
int _heal_max;
|
2019-12-29 01:58:25 +01:00
|
|
|
Stat::StatId _heal_scale_stat;
|
|
|
|
float _heal_scale_coeff;
|
|
|
|
|
|
|
|
bool _dispell_enabled;
|
|
|
|
int _dispell_count_min;
|
|
|
|
int _dispell_count_max;
|
|
|
|
int _dispell_aura_types;
|
2019-04-20 14:02:55 +02:00
|
|
|
|
2019-12-29 01:58:25 +01:00
|
|
|
bool _cast_time_enabled;
|
2019-04-20 14:02:55 +02:00
|
|
|
float _cast_time;
|
|
|
|
|
|
|
|
bool _needs_target;
|
|
|
|
bool _can_move_while_casting;
|
|
|
|
|
2019-12-29 01:58:25 +01:00
|
|
|
bool _interrupt_enabled;
|
2019-04-20 14:02:55 +02:00
|
|
|
float _interrupt_time;
|
|
|
|
|
|
|
|
bool _is_aoe;
|
|
|
|
SpellAOETargetType _aoe_targetType;
|
2019-12-13 09:35:14 +01:00
|
|
|
SpellEnums::ColliderType _aoe_colliderType;
|
|
|
|
float _aoe_radius;
|
|
|
|
Vector3 _aoe_box_extents;
|
|
|
|
|
2019-04-20 14:02:55 +02:00
|
|
|
int _spell_cooldown_mainpulation_data_count;
|
2019-09-12 23:43:53 +02:00
|
|
|
|
|
|
|
int _training_cost;
|
|
|
|
Ref<Spell> _training_required_spell;
|
2019-12-01 18:00:09 +01:00
|
|
|
Ref<EntitySkillData> _training_required_skill;
|
2019-09-12 23:43:53 +02:00
|
|
|
int _training_required_skill_level;
|
2019-04-20 14:02:55 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|