mirror of
https://github.com/Relintai/entity_spell_system.git
synced 2025-02-22 17:18:12 +01:00
The old Effect properties got cleaned up, and now their type is packedscene.
This commit is contained in:
parent
d4ebbdc69c
commit
49f2213b12
@ -125,6 +125,18 @@ void Aura::OnAuraAbilityScalingDataLoaded(AbilityScalingDataLoaderHelper *h) {
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
//Visual Effect
|
||||||
|
|
||||||
|
bool Aura::has_effect_visual() {
|
||||||
|
return _effect_visual.is_valid();
|
||||||
|
}
|
||||||
|
Ref<PackedScene> Aura::get_effect_visual() {
|
||||||
|
return _effect_visual;
|
||||||
|
}
|
||||||
|
void Aura::set_effect_visual(Ref<PackedScene> value) {
|
||||||
|
_effect_visual = value;
|
||||||
|
}
|
||||||
|
|
||||||
//Damage
|
//Damage
|
||||||
bool Aura::is_damage_enabled() {
|
bool Aura::is_damage_enabled() {
|
||||||
return _damage_enabled;
|
return _damage_enabled;
|
||||||
@ -874,6 +886,13 @@ void Aura::_bind_methods() {
|
|||||||
|
|
||||||
ClassDB::bind_method(D_METHOD("_setup_aura_data", "data", "info"), &Aura::_setup_aura_data);
|
ClassDB::bind_method(D_METHOD("_setup_aura_data", "data", "info"), &Aura::_setup_aura_data);
|
||||||
|
|
||||||
|
//Visual Effect
|
||||||
|
ADD_GROUP("Visual Effect", "effect");
|
||||||
|
ClassDB::bind_method(D_METHOD("has_effect_visual"), &Aura::has_effect_visual);
|
||||||
|
ClassDB::bind_method(D_METHOD("get_effect_visual"), &Aura::get_effect_visual);
|
||||||
|
ClassDB::bind_method(D_METHOD("set_effect_visual", "value"), &Aura::set_effect_visual);
|
||||||
|
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "effect_visual", PROPERTY_HINT_RESOURCE_TYPE, "PackedScene"), "set_effect_visual", "get_effect_visual");
|
||||||
|
|
||||||
//damage
|
//damage
|
||||||
ClassDB::bind_method(D_METHOD("sapply_passives_damage_receive", "data"), &Aura::sapply_passives_damage_receive);
|
ClassDB::bind_method(D_METHOD("sapply_passives_damage_receive", "data"), &Aura::sapply_passives_damage_receive);
|
||||||
ClassDB::bind_method(D_METHOD("sapply_passives_damage_deal", "data"), &Aura::sapply_passives_damage_deal);
|
ClassDB::bind_method(D_METHOD("sapply_passives_damage_deal", "data"), &Aura::sapply_passives_damage_deal);
|
||||||
|
@ -70,6 +70,11 @@ public:
|
|||||||
// static void FromJSON(Aura* ada, JsonReader* r);
|
// static void FromJSON(Aura* ada, JsonReader* r);
|
||||||
// static void ToJSON(Aura* ada, JsonWriter* w);
|
// static void ToJSON(Aura* ada, JsonWriter* w);
|
||||||
|
|
||||||
|
//VisualEffect
|
||||||
|
bool has_effect_visual();
|
||||||
|
Ref<PackedScene> get_effect_visual();
|
||||||
|
void set_effect_visual(Ref<PackedScene> value);
|
||||||
|
|
||||||
//Damage
|
//Damage
|
||||||
bool is_damage_enabled();
|
bool is_damage_enabled();
|
||||||
void set_damage_enabled(bool value);
|
void set_damage_enabled(bool value);
|
||||||
@ -333,6 +338,8 @@ private:
|
|||||||
String _aura_description;
|
String _aura_description;
|
||||||
int ability_scale_data_id;
|
int ability_scale_data_id;
|
||||||
|
|
||||||
|
Ref<PackedScene> _effect_visual;
|
||||||
|
|
||||||
bool _damage_enabled;
|
bool _damage_enabled;
|
||||||
int _damage_type;
|
int _damage_type;
|
||||||
int _damage_min;
|
int _damage_min;
|
||||||
|
431
data/spell.cpp
431
data/spell.cpp
@ -2,6 +2,41 @@
|
|||||||
|
|
||||||
#include "aura.h"
|
#include "aura.h"
|
||||||
|
|
||||||
|
int Spell::get_spell_id() {
|
||||||
|
return _spell_id;
|
||||||
|
}
|
||||||
|
void Spell::set_spell_id(int value) {
|
||||||
|
_spell_id = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
int Spell::get_spell_type() {
|
||||||
|
return _spell_type;
|
||||||
|
}
|
||||||
|
void Spell::set_spell_type(int value) {
|
||||||
|
_spell_type = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Spell::get_hide_from_actionbar() {
|
||||||
|
return _hide_from_actionbar;
|
||||||
|
}
|
||||||
|
void Spell::set_hide_from_actionbar(bool value) {
|
||||||
|
_hide_from_actionbar = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
float Spell::get_cooldown() {
|
||||||
|
return _cooldown;
|
||||||
|
}
|
||||||
|
void Spell::set_cooldown(float value) {
|
||||||
|
_cooldown = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
SpellTargetType Spell::get_target_type() {
|
||||||
|
return _target_type;
|
||||||
|
}
|
||||||
|
void Spell::set_target_type(SpellTargetType value) {
|
||||||
|
_target_type = value;
|
||||||
|
}
|
||||||
|
|
||||||
Ref<Aura> Spell::get_caster_aura_apply() {
|
Ref<Aura> Spell::get_caster_aura_apply() {
|
||||||
return Ref<Aura>(_caster_aura_apply);
|
return Ref<Aura>(_caster_aura_apply);
|
||||||
}
|
}
|
||||||
@ -54,6 +89,104 @@ void Spell::set_target_aura_apply2(Ref<Aura> value) {
|
|||||||
_target_aura_apply2_ref = memnew(Ref<Aura>(value));
|
_target_aura_apply2_ref = memnew(Ref<Aura>(value));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int Spell::get_level() {
|
||||||
|
return _level;
|
||||||
|
}
|
||||||
|
void Spell::set_level(int value) {
|
||||||
|
_level = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
int Spell::get_item_cost() {
|
||||||
|
return _item_cost;
|
||||||
|
}
|
||||||
|
void Spell::set_item_cost(int value) {
|
||||||
|
_item_cost = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
int Spell::get_craft_material_cost() {
|
||||||
|
return _craft_material_cost;
|
||||||
|
}
|
||||||
|
void Spell::set_craft_material_cost(int value) {
|
||||||
|
_craft_material_cost = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
int Spell::get_required_item() {
|
||||||
|
return _required_item;
|
||||||
|
}
|
||||||
|
void Spell::set_required_item(int value) {
|
||||||
|
_required_item = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
EntityEnums::PlayerResourceTypes Spell::get_cost_type() {
|
||||||
|
return _cost_type;
|
||||||
|
}
|
||||||
|
void Spell::set_cost_type(EntityEnums::PlayerResourceTypes value) {
|
||||||
|
_cost_type = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
int Spell::get_cost_resource() {
|
||||||
|
return _cost_resource;
|
||||||
|
}
|
||||||
|
void Spell::set_cost_resource(int value) {
|
||||||
|
_cost_resource = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
EntityEnums::PlayerResourceTypes Spell::get_give_resource_type() {
|
||||||
|
return _give_resource_type;
|
||||||
|
}
|
||||||
|
void Spell::set_give_resource_type(EntityEnums::PlayerResourceTypes value) {
|
||||||
|
_give_resource_type = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
int Spell::get_give_resource() {
|
||||||
|
return _give_resource;
|
||||||
|
}
|
||||||
|
void Spell::set_give_resource(int value) {
|
||||||
|
_give_resource = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Spell::has_global_cooldown() {
|
||||||
|
return _has_global_cooldown;
|
||||||
|
}
|
||||||
|
void Spell::set_has_global_cooldown(bool value) {
|
||||||
|
_has_global_cooldown = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Spell::get_is_local_spell() {
|
||||||
|
return _is_local_spell;
|
||||||
|
}
|
||||||
|
void Spell::set_is_local_spell(bool value) {
|
||||||
|
_is_local_spell = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
Ref<Texture> Spell::get_icon() {
|
||||||
|
return _icon;
|
||||||
|
}
|
||||||
|
void Spell::set_icon(Ref<Texture> value) {
|
||||||
|
_icon = Ref<Texture>(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
String Spell::get_name_key() {
|
||||||
|
return _name_key;
|
||||||
|
}
|
||||||
|
void Spell::set_name_key(String value) {
|
||||||
|
_name_key = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
String Spell::get_spell_name() {
|
||||||
|
return _spell_name;
|
||||||
|
}
|
||||||
|
void Spell::set_spell_name(String value) {
|
||||||
|
_spell_name = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
String Spell::get_spell_description() {
|
||||||
|
return _spell_description;
|
||||||
|
}
|
||||||
|
void Spell::set_spell_description(String value) {
|
||||||
|
_spell_description = value;
|
||||||
|
}
|
||||||
|
|
||||||
float Spell::get_damage_scale_for_level(int level) {
|
float Spell::get_damage_scale_for_level(int level) {
|
||||||
//return getDamageLevelScaling()->Evaluate((float)(level));
|
//return getDamageLevelScaling()->Evaluate((float)(level));
|
||||||
return 1;
|
return 1;
|
||||||
@ -69,6 +202,249 @@ float Spell::get_absorb_scale_for_level(int level) {
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Spell::get_has_range() {
|
||||||
|
return _has_range;
|
||||||
|
}
|
||||||
|
void Spell::set_has_range(bool value) {
|
||||||
|
_has_range = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
float Spell::get_range() {
|
||||||
|
return _range;
|
||||||
|
}
|
||||||
|
void Spell::set_range(float value) {
|
||||||
|
_range = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Spell::get_has_cast_time() {
|
||||||
|
return _has_cast_time;
|
||||||
|
}
|
||||||
|
void Spell::set_has_cast_time(bool value) {
|
||||||
|
_has_cast_time = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
float Spell::get_cast_time() {
|
||||||
|
return _cast_time;
|
||||||
|
}
|
||||||
|
void Spell::set_cast_time(float value) {
|
||||||
|
_cast_time = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Spell::get_has_damage() {
|
||||||
|
return _has_damage;
|
||||||
|
}
|
||||||
|
void Spell::set_has_damage(bool value) {
|
||||||
|
_has_damage = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
int Spell::get_damage_type() {
|
||||||
|
return _damage_type;
|
||||||
|
}
|
||||||
|
void Spell::set_damage_type(int value) {
|
||||||
|
_damage_type = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
int Spell::get_damage_min() {
|
||||||
|
return _damage_min;
|
||||||
|
}
|
||||||
|
void Spell::set_damage_min(int value) {
|
||||||
|
_damage_min = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
int Spell::get_damage_max() {
|
||||||
|
return _damage_max;
|
||||||
|
}
|
||||||
|
void Spell::set_damage_max(int value) {
|
||||||
|
_damage_max = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
Ref<Curve> Spell::get_damage_scaling_curve() {
|
||||||
|
return _damage_scaling_curve;
|
||||||
|
}
|
||||||
|
void Spell::set_damage_scaling_curve(Ref<Curve> curve) {
|
||||||
|
_damage_scaling_curve = curve;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Spell::get_has_heal() {
|
||||||
|
return _has_heal;
|
||||||
|
}
|
||||||
|
void Spell::set_has_heal(bool value) {
|
||||||
|
_has_heal = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
int Spell::get_heal_min() {
|
||||||
|
return _heal_min;
|
||||||
|
}
|
||||||
|
void Spell::set_heal_min(int value) {
|
||||||
|
_heal_min = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
int Spell::get_heal_max() {
|
||||||
|
return _heal_max;
|
||||||
|
}
|
||||||
|
void Spell::set_heal_max(int value) {
|
||||||
|
_heal_max = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
Ref<Curve> Spell::get_heal_scaling_curve() {
|
||||||
|
return _heal_scaling_curve;
|
||||||
|
}
|
||||||
|
void Spell::set_heal_scaling_curve(Ref<Curve> curve) {
|
||||||
|
_heal_scaling_curve = curve;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Spell::get_needs_target() {
|
||||||
|
return _needs_target;
|
||||||
|
}
|
||||||
|
void Spell::set_needs_target(bool value) {
|
||||||
|
_needs_target = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Spell::get_can_move_while_casting() {
|
||||||
|
return _can_move_while_casting;
|
||||||
|
}
|
||||||
|
void Spell::set_can_move_while_casting(bool value) {
|
||||||
|
_can_move_while_casting = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Spell::get_is_interrupt() {
|
||||||
|
return _is_interrupt;
|
||||||
|
}
|
||||||
|
void Spell::set_is_interrupt(bool value) {
|
||||||
|
_is_interrupt = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
float Spell::get_interrupt_time() {
|
||||||
|
return _interrupt_time;
|
||||||
|
}
|
||||||
|
void Spell::set_interrupt_time(float value) {
|
||||||
|
_interrupt_time = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Spell::get_is_aoe() {
|
||||||
|
return _is_aoe;
|
||||||
|
}
|
||||||
|
void Spell::set_is_aoe(bool value) {
|
||||||
|
_is_aoe = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
SpellAOETargetType Spell::get_aoe_target_type() {
|
||||||
|
return _aoe_targetType;
|
||||||
|
}
|
||||||
|
void Spell::set_aoe_target_type(SpellAOETargetType value) {
|
||||||
|
_aoe_targetType = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
SpellAOEMovementType Spell::get_aoe_movement_type() {
|
||||||
|
return _aoe_movementType;
|
||||||
|
}
|
||||||
|
void Spell::set_aoe_movement_type(SpellAOEMovementType value) {
|
||||||
|
_aoe_movementType = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
SpellAOEColliderType Spell::get_aoe_collider_type() {
|
||||||
|
return _aoe_colliderType;
|
||||||
|
}
|
||||||
|
void Spell::set_aoe_collider_type(SpellAOEColliderType value) {
|
||||||
|
_aoe_colliderType = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
Vector3 Spell::get_aoe_half_extents() {
|
||||||
|
return _aoe_half_extents;
|
||||||
|
}
|
||||||
|
void Spell::set_aoe_half_extents(Vector3 value) {
|
||||||
|
_aoe_half_extents = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Spell::has_effect_visual() {
|
||||||
|
return _effect_visual.is_valid();
|
||||||
|
}
|
||||||
|
Ref<PackedScene> Spell::get_effect_visual() {
|
||||||
|
return _effect_visual;
|
||||||
|
}
|
||||||
|
void Spell::set_effect_visual(Ref<PackedScene> value) {
|
||||||
|
_effect_visual = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Spell::has_spell_cast_finish_effect() {
|
||||||
|
return _spell_cast_finish_effect.is_valid();
|
||||||
|
}
|
||||||
|
Ref<PackedScene> Spell::get_spell_cast_finish_effect() {
|
||||||
|
return _spell_cast_finish_effect;
|
||||||
|
}
|
||||||
|
void Spell::set_spell_cast_finish_effect(Ref<PackedScene> value) {
|
||||||
|
_spell_cast_finish_effect = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Spell::has_spell_cast_effect() {
|
||||||
|
return _spell_cast_effect.is_valid();
|
||||||
|
}
|
||||||
|
Ref<PackedScene> Spell::get_spell_cast_effect() {
|
||||||
|
return _spell_cast_effect;
|
||||||
|
}
|
||||||
|
void Spell::set_spell_cast_effect(Ref<PackedScene> value) {
|
||||||
|
_spell_cast_effect = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
Ref<PackedScene> Spell::get_projectile() {
|
||||||
|
return _projectile;
|
||||||
|
}
|
||||||
|
void Spell::set_projectile(Ref<PackedScene> value) {
|
||||||
|
_projectile = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Spell::has_projectile() {
|
||||||
|
return _projectile.is_valid();
|
||||||
|
}
|
||||||
|
float Spell::get_projectile_speed() {
|
||||||
|
return _projectile_speed;
|
||||||
|
}
|
||||||
|
void Spell::set_projectile_speed(float value) {
|
||||||
|
_projectile_speed = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
float Spell::get_projectile_time() {
|
||||||
|
return _projectile_time;
|
||||||
|
}
|
||||||
|
void Spell::set_projectile_time(float value) {
|
||||||
|
_projectile_time = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
float Spell::get_projectile_range() {
|
||||||
|
return _projectile_range;
|
||||||
|
}
|
||||||
|
void Spell::set_projectile_range(float value) {
|
||||||
|
_projectile_range = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Spell::get_has_projectile_collision() {
|
||||||
|
return _projectile_collision;
|
||||||
|
}
|
||||||
|
void Spell::set_has_projectile_collision(bool value) {
|
||||||
|
_projectile_collision = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
SpellProjectileType Spell::get_projectile_type() {
|
||||||
|
return _projectile_type;
|
||||||
|
}
|
||||||
|
void Spell::set_projectile_type(SpellProjectileType value) {
|
||||||
|
_projectile_type = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Spell::get_has_projectile_destroy_on_impact() {
|
||||||
|
return _projectile_destroy_on_impact;
|
||||||
|
}
|
||||||
|
void Spell::set_has_projectile_destroy_on_impact(bool value) {
|
||||||
|
_projectile_destroy_on_impact = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
int Spell::get_spell_cooldown_mainpulation_data_count() {
|
||||||
|
return _spell_cooldown_mainpulation_data_count;
|
||||||
|
}
|
||||||
|
void Spell::set_spell_cooldown_mainpulation_data_count(int value) {
|
||||||
|
_spell_cooldown_mainpulation_data_count = value;
|
||||||
|
}
|
||||||
|
|
||||||
//// Spell System ////
|
//// Spell System ////
|
||||||
|
|
||||||
void Spell::sstart_casting_simple(Entity *caster, float spell_scale) {
|
void Spell::sstart_casting_simple(Entity *caster, float spell_scale) {
|
||||||
@ -370,17 +746,6 @@ Spell::Spell() {
|
|||||||
_has_cast_time = false;
|
_has_cast_time = false;
|
||||||
_cast_time = 0;
|
_cast_time = 0;
|
||||||
|
|
||||||
_has_effect = false;
|
|
||||||
_effect_id = 0;
|
|
||||||
|
|
||||||
_has_spell_cast_finish_effect = false;
|
|
||||||
_spell_cast_finish_effect_id = 0;
|
|
||||||
|
|
||||||
_has_spell_cast_effect = false;
|
|
||||||
_spell_cast_effect_id = 0;
|
|
||||||
|
|
||||||
_has_projectile = false;
|
|
||||||
_projectile_id = 0;
|
|
||||||
_projectile_speed = 0;
|
_projectile_speed = 0;
|
||||||
_projectile_time = 0;
|
_projectile_time = 0;
|
||||||
_projectile_range = 0;
|
_projectile_range = 0;
|
||||||
@ -663,38 +1028,26 @@ void Spell::_bind_methods() {
|
|||||||
ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "aoe_half_extents"), "set_aoe_half_extents", "get_aoe_half_extents");
|
ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "aoe_half_extents"), "set_aoe_half_extents", "get_aoe_half_extents");
|
||||||
|
|
||||||
ADD_GROUP("Effect", "effect");
|
ADD_GROUP("Effect", "effect");
|
||||||
ClassDB::bind_method(D_METHOD("get_has_effect"), &Spell::get_has_effect);
|
ClassDB::bind_method(D_METHOD("has_effect_visual"), &Spell::has_effect_visual);
|
||||||
ClassDB::bind_method(D_METHOD("set_has_effect", "value"), &Spell::set_has_effect);
|
ClassDB::bind_method(D_METHOD("get_effect_visual"), &Spell::get_effect_visual);
|
||||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "effect"), "set_has_effect", "get_has_effect");
|
ClassDB::bind_method(D_METHOD("set_effect_visual", "value"), &Spell::set_effect_visual);
|
||||||
|
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "effect_visual", PROPERTY_HINT_RESOURCE_TYPE, "PackedScene"), "set_effect_visual", "get_effect_visual");
|
||||||
|
|
||||||
ClassDB::bind_method(D_METHOD("get_effect_id"), &Spell::get_effect_id);
|
ClassDB::bind_method(D_METHOD("has_spell_cast_finish_effect"), &Spell::has_spell_cast_finish_effect);
|
||||||
ClassDB::bind_method(D_METHOD("set_effect_id", "value"), &Spell::set_effect_id);
|
ClassDB::bind_method(D_METHOD("get_spell_cast_finish_effect"), &Spell::get_spell_cast_finish_effect);
|
||||||
ADD_PROPERTY(PropertyInfo(Variant::INT, "effect_id"), "set_effect_id", "get_effect_id");
|
ClassDB::bind_method(D_METHOD("set_spell_cast_finish_effect", "value"), &Spell::set_spell_cast_finish_effect);
|
||||||
|
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "effect_spell_cast_finish_effect", PROPERTY_HINT_RESOURCE_TYPE, "PackedScene"), "set_spell_cast_finish_effect", "get_spell_cast_finish_effect");
|
||||||
|
|
||||||
ClassDB::bind_method(D_METHOD("get_has_spell_cast_finish_effect"), &Spell::get_has_spell_cast_finish_effect);
|
ClassDB::bind_method(D_METHOD("has_spell_cast_effect"), &Spell::has_spell_cast_effect);
|
||||||
ClassDB::bind_method(D_METHOD("set_has_spell_cast_finish_effect", "value"), &Spell::set_has_spell_cast_finish_effect);
|
ClassDB::bind_method(D_METHOD("get_spell_cast_effect"), &Spell::get_spell_cast_effect);
|
||||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "effect_spell_cast_finish_effect"), "set_has_spell_cast_finish_effect", "get_has_spell_cast_finish_effect");
|
ClassDB::bind_method(D_METHOD("set_spell_cast_effect", "value"), &Spell::set_spell_cast_effect);
|
||||||
|
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "effect_spell_cast_effect_id", PROPERTY_HINT_RESOURCE_TYPE, "PackedScene"), "set_spell_cast_effect", "get_spell_cast_effect");
|
||||||
ClassDB::bind_method(D_METHOD("get_spell_cast_finish_effect_id"), &Spell::get_spell_cast_finish_effect_id);
|
|
||||||
ClassDB::bind_method(D_METHOD("set_spell_cast_finish_effect_id", "value"), &Spell::set_spell_cast_finish_effect_id);
|
|
||||||
ADD_PROPERTY(PropertyInfo(Variant::INT, "effect_spell_cast_finish_effect_id"), "set_spell_cast_finish_effect_id", "get_spell_cast_finish_effect_id");
|
|
||||||
|
|
||||||
ClassDB::bind_method(D_METHOD("get_has_spell_cast_effect"), &Spell::get_has_spell_cast_effect);
|
|
||||||
ClassDB::bind_method(D_METHOD("set_has_spell_cast_effect", "value"), &Spell::set_has_spell_cast_effect);
|
|
||||||
ADD_PROPERTY(PropertyInfo(Variant::INT, "effect_m_spell_cast_effect"), "set_has_spell_cast_effect", "get_has_spell_cast_effect");
|
|
||||||
|
|
||||||
ClassDB::bind_method(D_METHOD("get_spell_cast_effect_id"), &Spell::get_spell_cast_effect_id);
|
|
||||||
ClassDB::bind_method(D_METHOD("set_spell_cast_effect_id", "value"), &Spell::set_spell_cast_effect_id);
|
|
||||||
ADD_PROPERTY(PropertyInfo(Variant::INT, "effect_spell_cast_effect_id"), "set_spell_cast_effect_id", "get_spell_cast_effect_id");
|
|
||||||
|
|
||||||
ADD_GROUP("Projectile", "projectile");
|
ADD_GROUP("Projectile", "projectile");
|
||||||
ClassDB::bind_method(D_METHOD("get_has_projectile"), &Spell::get_has_projectile);
|
ClassDB::bind_method(D_METHOD("has_projectile"), &Spell::has_projectile);
|
||||||
ClassDB::bind_method(D_METHOD("set_has_projectile", "value"), &Spell::set_has_projectile);
|
ClassDB::bind_method(D_METHOD("get_projectile"), &Spell::get_projectile);
|
||||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "projectile"), "set_has_projectile", "get_has_projectile");
|
ClassDB::bind_method(D_METHOD("set_projectile", "value"), &Spell::set_projectile);
|
||||||
|
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "projectile", PROPERTY_HINT_RESOURCE_TYPE, "PackedScene"), "set_projectile", "get_projectile");
|
||||||
ClassDB::bind_method(D_METHOD("get_projectile_id"), &Spell::get_projectile_id);
|
|
||||||
ClassDB::bind_method(D_METHOD("set_projectile_id", "value"), &Spell::set_projectile_id);
|
|
||||||
ADD_PROPERTY(PropertyInfo(Variant::INT, "projectile_id"), "set_projectile_id", "get_projectile_id");
|
|
||||||
|
|
||||||
ClassDB::bind_method(D_METHOD("get_projectile_speed"), &Spell::get_projectile_speed);
|
ClassDB::bind_method(D_METHOD("get_projectile_speed"), &Spell::get_projectile_speed);
|
||||||
ClassDB::bind_method(D_METHOD("set_projectile_speed", "value"), &Spell::set_projectile_speed);
|
ClassDB::bind_method(D_METHOD("set_projectile_speed", "value"), &Spell::set_projectile_speed);
|
||||||
|
239
data/spell.h
239
data/spell.h
@ -4,6 +4,7 @@
|
|||||||
#include "core/resource.h"
|
#include "core/resource.h"
|
||||||
#include "scene/resources/curve.h"
|
#include "scene/resources/curve.h"
|
||||||
#include "scene/resources/texture.h"
|
#include "scene/resources/texture.h"
|
||||||
|
#include "scene/resources/packed_scene.h"
|
||||||
|
|
||||||
#include "../entity_enums.h"
|
#include "../entity_enums.h"
|
||||||
#include "../spell_enums.h"
|
#include "../spell_enums.h"
|
||||||
@ -78,20 +79,20 @@ class Spell : public Resource {
|
|||||||
GDCLASS(Spell, Resource);
|
GDCLASS(Spell, Resource);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
int get_spell_id() { return _spell_id; }
|
int get_spell_id();
|
||||||
void set_spell_id(int value) { _spell_id = value; }
|
void set_spell_id(int value);
|
||||||
|
|
||||||
int get_spell_type() { return _spell_type; }
|
int get_spell_type();
|
||||||
void set_spell_type(int value) { _spell_type = value; }
|
void set_spell_type(int value);
|
||||||
|
|
||||||
bool get_hide_from_actionbar() { return _hide_from_actionbar; }
|
bool get_hide_from_actionbar();
|
||||||
void set_hide_from_actionbar(bool value) { _hide_from_actionbar = value; }
|
void set_hide_from_actionbar(bool value);
|
||||||
|
|
||||||
float get_cooldown() { return _cooldown; }
|
float get_cooldown();
|
||||||
void set_cooldown(float value) { _cooldown = value; }
|
void set_cooldown(float value);
|
||||||
|
|
||||||
SpellTargetType get_target_type() { return _target_type; }
|
SpellTargetType get_target_type();
|
||||||
void set_target_type(SpellTargetType value) { _target_type = value; }
|
void set_target_type(SpellTargetType value);
|
||||||
|
|
||||||
Ref<Aura> get_caster_aura_apply();
|
Ref<Aura> get_caster_aura_apply();
|
||||||
void set_caster_aura_apply(Ref<Aura> value);
|
void set_caster_aura_apply(Ref<Aura> value);
|
||||||
@ -105,162 +106,154 @@ public:
|
|||||||
Ref<Aura> get_target_aura_apply2();
|
Ref<Aura> get_target_aura_apply2();
|
||||||
void set_target_aura_apply2(Ref<Aura> value);
|
void set_target_aura_apply2(Ref<Aura> value);
|
||||||
|
|
||||||
int get_level() { return _level; }
|
int get_level();
|
||||||
void set_level(int value) { _level = value; }
|
void set_level(int value);
|
||||||
|
|
||||||
int get_item_cost() { return _item_cost; }
|
int get_item_cost();
|
||||||
void set_item_cost(int value) { _item_cost = value; }
|
void set_item_cost(int value);
|
||||||
|
|
||||||
int get_craft_material_cost() { return _craft_material_cost; }
|
int get_craft_material_cost();
|
||||||
void set_craft_material_cost(int value) { _craft_material_cost = value; }
|
void set_craft_material_cost(int value);
|
||||||
|
|
||||||
int get_required_item() { return _required_item; }
|
int get_required_item();
|
||||||
void set_required_item(int value) { _required_item = value; }
|
void set_required_item(int value);
|
||||||
|
|
||||||
EntityEnums::PlayerResourceTypes get_cost_type() { return _cost_type; }
|
EntityEnums::PlayerResourceTypes get_cost_type();
|
||||||
void set_cost_type(EntityEnums::PlayerResourceTypes value) { _cost_type = value; }
|
void set_cost_type(EntityEnums::PlayerResourceTypes value);
|
||||||
|
|
||||||
int get_cost_resource() { return _cost_resource; }
|
int get_cost_resource();
|
||||||
void set_cost_resource(int value) { _cost_resource = value; }
|
void set_cost_resource(int value);
|
||||||
|
|
||||||
EntityEnums::PlayerResourceTypes get_give_resource_type() { return _give_resource_type; }
|
EntityEnums::PlayerResourceTypes get_give_resource_type();
|
||||||
void set_give_resource_type(EntityEnums::PlayerResourceTypes value) { _give_resource_type = value; }
|
void set_give_resource_type(EntityEnums::PlayerResourceTypes value);
|
||||||
|
|
||||||
int get_give_resource() { return _give_resource; }
|
int get_give_resource();
|
||||||
void set_give_resource(int value) { _give_resource = value; }
|
void set_give_resource(int value);
|
||||||
|
|
||||||
bool has_global_cooldown() { return _has_global_cooldown; }
|
bool has_global_cooldown();
|
||||||
void set_has_global_cooldown(bool value) { _has_global_cooldown = value; }
|
void set_has_global_cooldown(bool value);
|
||||||
|
|
||||||
bool get_is_local_spell() { return _is_local_spell; }
|
bool get_is_local_spell();
|
||||||
void set_is_local_spell(bool value) { _is_local_spell = value; }
|
void set_is_local_spell(bool value);
|
||||||
|
|
||||||
Ref<Texture> get_icon() { return _icon; }
|
Ref<Texture> get_icon();
|
||||||
void set_icon(Ref<Texture> value) { _icon = Ref<Texture>(value); }
|
void set_icon(Ref<Texture> value);
|
||||||
|
|
||||||
String get_name_key() { return _name_key; }
|
String get_name_key();
|
||||||
void set_name_key(String value) { _name_key = value; }
|
void set_name_key(String value);
|
||||||
|
|
||||||
String get_spell_name() { return _spell_name; }
|
String get_spell_name();
|
||||||
void set_spell_name(String value) { _spell_name = value; }
|
void set_spell_name(String value);
|
||||||
|
|
||||||
String get_spell_description() { return _spell_description; }
|
String get_spell_description();
|
||||||
void set_spell_description(String value) { _spell_description = value; }
|
void set_spell_description(String value);
|
||||||
|
|
||||||
float get_damage_scale_for_level(int level);
|
float get_damage_scale_for_level(int level);
|
||||||
float get_heal_scale_for_level(int level);
|
float get_heal_scale_for_level(int level);
|
||||||
float get_absorb_scale_for_level(int level);
|
float get_absorb_scale_for_level(int level);
|
||||||
|
|
||||||
bool get_has_range() { return _has_range; }
|
bool get_has_range();
|
||||||
void set_has_range(bool value) { _has_range = value; }
|
void set_has_range(bool value);
|
||||||
|
|
||||||
float get_range() { return _range; }
|
float get_range();
|
||||||
void set_range(float value) { _range = value; }
|
void set_range(float value);
|
||||||
|
|
||||||
bool get_has_cast_time() { return _has_cast_time; }
|
bool get_has_cast_time();
|
||||||
void set_has_cast_time(bool value) { _has_cast_time = value; }
|
void set_has_cast_time(bool value);
|
||||||
|
|
||||||
float get_cast_time() { return _cast_time; }
|
float get_cast_time();
|
||||||
void set_cast_time(float value) { _cast_time = value; }
|
void set_cast_time(float value);
|
||||||
|
|
||||||
bool get_has_damage() { return _has_damage; }
|
bool get_has_damage();
|
||||||
void set_has_damage(bool value) { _has_damage = value; }
|
void set_has_damage(bool value);
|
||||||
|
|
||||||
int get_damage_type() { return _damage_type; }
|
int get_damage_type();
|
||||||
void set_damage_type(int value) { _damage_type = value; }
|
void set_damage_type(int value);
|
||||||
|
|
||||||
int get_damage_min() { return _damage_min; }
|
int get_damage_min();
|
||||||
void set_damage_min(int value) { _damage_min = value; }
|
void set_damage_min(int value);
|
||||||
|
|
||||||
int get_damage_max() { return _damage_max; }
|
int get_damage_max();
|
||||||
void set_damage_max(int value) { _damage_max = value; }
|
void set_damage_max(int value);
|
||||||
|
|
||||||
Ref<Curve> get_damage_scaling_curve() { return _damage_scaling_curve; }
|
Ref<Curve> get_damage_scaling_curve();
|
||||||
void set_damage_scaling_curve(Ref<Curve> curve) { _damage_scaling_curve = curve; }
|
void set_damage_scaling_curve(Ref<Curve> curve);
|
||||||
|
|
||||||
bool get_has_heal() { return _has_heal; }
|
bool get_has_heal();
|
||||||
void set_has_heal(bool value) { _has_heal = value; }
|
void set_has_heal(bool value);
|
||||||
|
|
||||||
int get_heal_min() { return _heal_min; }
|
int get_heal_min();
|
||||||
void set_heal_min(int value) { _heal_min = value; }
|
void set_heal_min(int value);
|
||||||
|
|
||||||
int get_heal_max() { return _heal_max; }
|
int get_heal_max();
|
||||||
void set_heal_max(int value) { _heal_max = value; }
|
void set_heal_max(int value);
|
||||||
|
|
||||||
Ref<Curve> get_heal_scaling_curve() { return _heal_scaling_curve; }
|
Ref<Curve> get_heal_scaling_curve();
|
||||||
void set_heal_scaling_curve(Ref<Curve> curve) { _heal_scaling_curve = curve; }
|
void set_heal_scaling_curve(Ref<Curve> curve);
|
||||||
|
|
||||||
bool get_needs_target() { return _needs_target; }
|
bool get_needs_target();
|
||||||
void set_needs_target(bool value) { _needs_target = value; }
|
void set_needs_target(bool value);
|
||||||
|
|
||||||
bool get_can_move_while_casting() { return _can_move_while_casting; }
|
bool get_can_move_while_casting();
|
||||||
void set_can_move_while_casting(bool value) { _can_move_while_casting = value; }
|
void set_can_move_while_casting(bool value);
|
||||||
|
|
||||||
bool get_is_interrupt() { return _is_interrupt; }
|
bool get_is_interrupt();
|
||||||
void set_is_interrupt(bool value) { _is_interrupt = value; }
|
void set_is_interrupt(bool value);
|
||||||
|
|
||||||
float get_interrupt_time() { return _interrupt_time; }
|
float get_interrupt_time();
|
||||||
void set_interrupt_time(float value) { _interrupt_time = value; }
|
void set_interrupt_time(float value);
|
||||||
|
|
||||||
bool get_is_aoe() { return _is_aoe; }
|
bool get_is_aoe();
|
||||||
void set_is_aoe(bool value) { _is_aoe = value; }
|
void set_is_aoe(bool value);
|
||||||
|
|
||||||
SpellAOETargetType get_aoe_target_type() { return _aoe_targetType; }
|
SpellAOETargetType get_aoe_target_type();
|
||||||
void set_aoe_target_type(SpellAOETargetType value) { _aoe_targetType = value; }
|
void set_aoe_target_type(SpellAOETargetType value);
|
||||||
|
|
||||||
SpellAOEMovementType get_aoe_movement_type() { return _aoe_movementType; }
|
SpellAOEMovementType get_aoe_movement_type();
|
||||||
void set_aoe_movement_type(SpellAOEMovementType value) { _aoe_movementType = value; }
|
void set_aoe_movement_type(SpellAOEMovementType value);
|
||||||
|
|
||||||
SpellAOEColliderType get_aoe_collider_type() { return _aoe_colliderType; }
|
SpellAOEColliderType get_aoe_collider_type();
|
||||||
void set_aoe_collider_type(SpellAOEColliderType value) { _aoe_colliderType = value; }
|
void set_aoe_collider_type(SpellAOEColliderType value);
|
||||||
|
|
||||||
Vector3 get_aoe_half_extents() { return _aoe_half_extents; }
|
Vector3 get_aoe_half_extents();
|
||||||
void set_aoe_half_extents(Vector3 value) { _aoe_half_extents = value; }
|
void set_aoe_half_extents(Vector3 value);
|
||||||
|
|
||||||
bool get_has_effect() { return _has_effect; }
|
bool has_effect_visual();
|
||||||
void set_has_effect(bool value) { _has_effect = value; }
|
Ref<PackedScene> get_effect_visual();
|
||||||
|
void set_effect_visual(Ref<PackedScene> value);
|
||||||
|
|
||||||
int get_effect_id() { return _effect_id; }
|
bool has_spell_cast_finish_effect();
|
||||||
void set_effect_id(int value) { _effect_id = value; }
|
Ref<PackedScene> get_spell_cast_finish_effect();
|
||||||
|
void set_spell_cast_finish_effect(Ref<PackedScene> value);
|
||||||
|
|
||||||
bool get_has_spell_cast_finish_effect() { return _has_spell_cast_finish_effect; }
|
bool has_spell_cast_effect();
|
||||||
void set_has_spell_cast_finish_effect(bool value) { _has_spell_cast_finish_effect = value; }
|
Ref<PackedScene> get_spell_cast_effect();
|
||||||
|
void set_spell_cast_effect(Ref<PackedScene> value);
|
||||||
|
|
||||||
int get_spell_cast_finish_effect_id() { return _spell_cast_finish_effect_id; }
|
Ref<PackedScene> get_projectile();
|
||||||
void set_spell_cast_finish_effect_id(int value) { _spell_cast_finish_effect_id = value; }
|
void set_projectile(Ref<PackedScene> value);
|
||||||
|
|
||||||
bool get_has_spell_cast_effect() { return _has_spell_cast_effect; }
|
bool has_projectile();
|
||||||
void set_has_spell_cast_effect(bool value) { _has_spell_cast_effect = value; }
|
float get_projectile_speed();
|
||||||
|
void set_projectile_speed(float value);
|
||||||
|
|
||||||
int get_spell_cast_effect_id() { return _spell_cast_effect_id; }
|
float get_projectile_time();
|
||||||
void set_spell_cast_effect_id(int value) { _spell_cast_effect_id = value; }
|
void set_projectile_time(float value);
|
||||||
|
|
||||||
int get_projectile_id() { return _projectile_id; }
|
float get_projectile_range();
|
||||||
void set_projectile_id(int value) { _projectile_id = value; }
|
void set_projectile_range(float value);
|
||||||
|
|
||||||
bool get_has_projectile() { return _has_projectile; }
|
bool get_has_projectile_collision();
|
||||||
void set_has_projectile(bool value) { _has_projectile = value; }
|
void set_has_projectile_collision(bool value);
|
||||||
|
|
||||||
float get_projectile_speed() { return _projectile_speed; }
|
SpellProjectileType get_projectile_type();
|
||||||
void set_projectile_speed(float value) { _projectile_speed = value; }
|
void set_projectile_type(SpellProjectileType value);
|
||||||
|
|
||||||
float get_projectile_time() { return _projectile_time; }
|
bool get_has_projectile_destroy_on_impact();
|
||||||
void set_projectile_time(float value) { _projectile_time = value; }
|
void set_has_projectile_destroy_on_impact(bool value);
|
||||||
|
|
||||||
float get_projectile_range() { return _projectile_range; }
|
int get_spell_cooldown_mainpulation_data_count();
|
||||||
void set_projectile_range(float value) { _projectile_range = value; }
|
void set_spell_cooldown_mainpulation_data_count(int value);
|
||||||
|
|
||||||
bool get_has_projectile_collision() { return _projectile_collision; }
|
|
||||||
void set_has_projectile_collision(bool value) { _projectile_collision = value; }
|
|
||||||
|
|
||||||
SpellProjectileType get_projectile_type() { return _projectile_type; }
|
|
||||||
void set_projectile_type(SpellProjectileType value) { _projectile_type = value; }
|
|
||||||
|
|
||||||
bool get_has_projectile_destroy_on_impact() { return _projectile_destroy_on_impact; }
|
|
||||||
void set_has_projectile_destroy_on_impact(bool value) { _projectile_destroy_on_impact = value; }
|
|
||||||
|
|
||||||
int get_spell_cooldown_mainpulation_data_count() { return _spell_cooldown_mainpulation_data_count; }
|
|
||||||
void set_spell_cooldown_mainpulation_data_count(int value) { _spell_cooldown_mainpulation_data_count = value; }
|
|
||||||
|
|
||||||
//AuraApplyData *getAuraApplyData() { return auraApplyData; }
|
//AuraApplyData *getAuraApplyData() { return auraApplyData; }
|
||||||
//void setAuraApplyData(AuraApplyData *value) { auraApplyData = value; }
|
//void setAuraApplyData(AuraApplyData *value) { auraApplyData = value; }
|
||||||
@ -434,17 +427,11 @@ private:
|
|||||||
SpellAOEColliderType _aoe_colliderType;
|
SpellAOEColliderType _aoe_colliderType;
|
||||||
Vector3 _aoe_half_extents;
|
Vector3 _aoe_half_extents;
|
||||||
|
|
||||||
bool _has_effect;
|
Ref<PackedScene> _effect_visual;
|
||||||
int _effect_id;
|
Ref<PackedScene> _spell_cast_finish_effect;
|
||||||
|
Ref<PackedScene> _spell_cast_effect;
|
||||||
|
|
||||||
bool _has_spell_cast_finish_effect;
|
Ref<PackedScene> _projectile;
|
||||||
int _spell_cast_finish_effect_id;
|
|
||||||
|
|
||||||
bool _has_spell_cast_effect;
|
|
||||||
int _spell_cast_effect_id;
|
|
||||||
|
|
||||||
bool _has_projectile;
|
|
||||||
int _projectile_id;
|
|
||||||
float _projectile_speed;
|
float _projectile_speed;
|
||||||
float _projectile_time;
|
float _projectile_time;
|
||||||
float _projectile_range;
|
float _projectile_range;
|
||||||
|
Loading…
Reference in New Issue
Block a user