diff --git a/HEADS b/HEADS index 5cded21d..0f37fa3a 100644 --- a/HEADS +++ b/HEADS @@ -1 +1 @@ -{"engine": {"3.2": "c8ea7798483bedfee333d5493de540509bd3e243", "master": "8c73e813134001e575b6f59e3b0100471c007410"}, "world_generator": {"master": "97f10512f8832394389e1109154b8af34a2ef2c6"}, "entity_spell_system": {"master": "94d2ddf73b4d0adad1afc94615ac840531f72565"}, "ui_extensions": {"master": "6fe4f69fea8d71043b08d959b8085404c9c4fe47"}, "voxelman": {"master": "19f3c1f8ff34331a2f1bedf260637e415b3df7d0"}, "texture_packer": {"master": "b29b499adf570aa7f85af69ef080ff0d5e04afae"}, "fastnoise": {"master": "d0e3f1c759332cf0d9a5d7e0e71d0b0278310651"}, "mesh_data_resource": {"master": "4ee946963a16bbfdb4dbb5df52134d22aa168041"}, "procedural_animations": {"master": "9ae56c17230ba9c6160777650b2b89eecdc8df9e"}, "ess_data": {"master": "3bd637fdd3304b64a18287a49a6b7387acf2f5de"}, "fast_quadratic_mesh_simplifier": {"master": "f6d3d65cc6ce4dddfc68054164feec1f612ecd1f"}, "props": {"master": "b2bcb5ea6469b19298cd849c1232ddb5ad26f71c"}} \ No newline at end of file +{"engine": {"3.2": "8426ed2650ac740796a19d4a28a453db539c0fff", "master": "8c73e813134001e575b6f59e3b0100471c007410"}, "world_generator": {"master": "97f10512f8832394389e1109154b8af34a2ef2c6"}, "entity_spell_system": {"master": "f92758ce3df3c72a836dc259812f1083864dc542"}, "ui_extensions": {"master": "6fe4f69fea8d71043b08d959b8085404c9c4fe47"}, "voxelman": {"master": "19f3c1f8ff34331a2f1bedf260637e415b3df7d0"}, "texture_packer": {"master": "b29b499adf570aa7f85af69ef080ff0d5e04afae"}, "fastnoise": {"master": "d0e3f1c759332cf0d9a5d7e0e71d0b0278310651"}, "mesh_data_resource": {"master": "4ee946963a16bbfdb4dbb5df52134d22aa168041"}, "procedural_animations": {"master": "9ae56c17230ba9c6160777650b2b89eecdc8df9e"}, "ess_data": {"master": "3bd637fdd3304b64a18287a49a6b7387acf2f5de"}, "fast_quadratic_mesh_simplifier": {"master": "f6d3d65cc6ce4dddfc68054164feec1f612ecd1f"}, "props": {"master": "b2bcb5ea6469b19298cd849c1232ddb5ad26f71c"}} \ No newline at end of file diff --git a/game/modules/entity_classes/elementalist/2_elementalist.tres b/game/modules/entity_classes/elementalist/2_elementalist.tres index 81965638..00fd6be4 100644 --- a/game/modules/entity_classes/elementalist/2_elementalist.tres +++ b/game/modules/entity_classes/elementalist/2_elementalist.tres @@ -15,179 +15,6 @@ stamina = 5 intellect = 3 spirit = 5 -[sub_resource type="StatDataEntry" id=2] -base = 5.0 - -[sub_resource type="StatDataEntry" id=3] -stat_id = 12 - -[sub_resource type="StatDataEntry" id=4] -stat_id = 13 - -[sub_resource type="StatDataEntry" id=5] -stat_id = 19 - -[sub_resource type="StatDataEntry" id=6] -stat_id = 34 - -[sub_resource type="StatDataEntry" id=7] -stat_id = 21 - -[sub_resource type="StatDataEntry" id=8] -stat_id = 24 - -[sub_resource type="StatDataEntry" id=9] -stat_id = 38 - -[sub_resource type="StatDataEntry" id=10] -stat_id = 36 - -[sub_resource type="StatDataEntry" id=11] -stat_id = 31 - -[sub_resource type="StatDataEntry" id=12] -stat_id = 32 - -[sub_resource type="StatDataEntry" id=13] -stat_id = 8 -base = 1.5 - -[sub_resource type="StatDataEntry" id=14] -stat_id = 9 - -[sub_resource type="StatDataEntry" id=15] -stat_id = 10 - -[sub_resource type="StatDataEntry" id=16] -stat_id = 25 - -[sub_resource type="StatDataEntry" id=17] -stat_id = 5 - -[sub_resource type="StatDataEntry" id=18] -stat_id = 28 - -[sub_resource type="StatDataEntry" id=19] -stat_id = 3 -base = 5.0 - -[sub_resource type="StatDataEntry" id=20] -stat_id = 33 - -[sub_resource type="StatDataEntry" id=21] -stat_id = 6 - -[sub_resource type="StatDataEntry" id=22] -stat_id = 15 - -[sub_resource type="StatDataEntry" id=23] -stat_id = 16 - -[sub_resource type="StatDataEntry" id=24] -stat_id = 26 - -[sub_resource type="StatDataEntry" id=25] -stat_id = 22 - -[sub_resource type="StatDataEntry" id=26] -stat_id = 30 - -[sub_resource type="StatDataEntry" id=27] -stat_id = 20 - -[sub_resource type="StatDataEntry" id=28] -stat_id = 39 - -[sub_resource type="StatDataEntry" id=29] -stat_id = 11 - -[sub_resource type="StatDataEntry" id=30] -stat_id = 29 - -[sub_resource type="StatDataEntry" id=31] -stat_id = 35 - -[sub_resource type="StatDataEntry" id=32] -stat_id = 6 -base = 4.2 - -[sub_resource type="StatDataEntry" id=33] -stat_id = 17 - -[sub_resource type="StatDataEntry" id=34] -stat_id = 18 - -[sub_resource type="StatDataEntry" id=35] -stat_id = 27 - -[sub_resource type="StatDataEntry" id=36] -stat_id = 23 - -[sub_resource type="StatDataEntry" id=37] -stat_id = 14 - -[sub_resource type="StatDataEntry" id=38] -stat_id = 4 -base = 4.0 - -[sub_resource type="StatDataEntry" id=39] -stat_id = 2 -base = 6.0 - -[sub_resource type="StatDataEntry" id=40] -stat_id = 1 -base = 5.0 - -[sub_resource type="StatDataEntry" id=41] -stat_id = 37 - -[sub_resource type="StatDataEntry" id=42] -stat_id = 40 - -[sub_resource type="StatData" id=43] -level_stat_data = SubResource( 1 ) -stat/agility = SubResource( 2 ) -stat/strength = SubResource( 40 ) -stat/stamina = SubResource( 39 ) -stat/intellect = SubResource( 19 ) -stat/spirit = SubResource( 38 ) -stat/health = SubResource( 17 ) -stat/mana = SubResource( 21 ) -stat/speed = SubResource( 32 ) -stat/global_cooldown = SubResource( 13 ) -stat/haste = SubResource( 14 ) -stat/haste_rating = SubResource( 15 ) -stat/resilience = SubResource( 29 ) -stat/armor = SubResource( 3 ) -stat/attack_power = SubResource( 4 ) -stat/spell_power = SubResource( 37 ) -stat/melee_crit = SubResource( 22 ) -stat/melee_crit_bonus = SubResource( 23 ) -stat/spell_crit = SubResource( 33 ) -stat/spell_crit_bonus = SubResource( 34 ) -stat/block = SubResource( 5 ) -stat/parry = SubResource( 27 ) -stat/damage_reduction = SubResource( 7 ) -stat/melee_damage_reduction = SubResource( 25 ) -stat/spell_damage_reduction = SubResource( 36 ) -stat/damage_taken = SubResource( 8 ) -stat/heal_taken = SubResource( 16 ) -stat/melee_damage = SubResource( 24 ) -stat/spell_damage = SubResource( 35 ) -stat/holy_resist = SubResource( 18 ) -stat/shadow_resist = SubResource( 30 ) -stat/nature_resist = SubResource( 26 ) -stat/fire_resist = SubResource( 11 ) -stat/frost_resist = SubResource( 12 ) -stat/lightning_resist = SubResource( 20 ) -stat/chaos_resist = SubResource( 6 ) -stat/silence_resist = SubResource( 31 ) -stat/fear_resist = SubResource( 10 ) -stat/stun_resist = SubResource( 41 ) -stat/energy = SubResource( 9 ) -stat/rage = SubResource( 28 ) -stat/xp_rate = SubResource( 42 ) - [resource] resource_name = "Elementalist" id = 2 diff --git a/game/modules/entity_classes/naturalist/entities/1_naturalist.tres b/game/modules/entity_classes/naturalist/entities/1_naturalist.tres index 04f7c578..63150bab 100644 --- a/game/modules/entity_classes/naturalist/entities/1_naturalist.tres +++ b/game/modules/entity_classes/naturalist/entities/1_naturalist.tres @@ -1,4 +1,4 @@ -[gd_resource type="EntityData" load_steps=49 format=2] +[gd_resource type="EntityData" load_steps=8 format=2] [ext_resource path="res://modules/core/crafting/2_chest_of_the_infinite_wisdom.tres" type="CraftRecipe" id=1] [ext_resource path="res://modules/entity_classes/naturalist/1_naturalist.tres" type="EntityClassData" id=2] @@ -6,186 +6,22 @@ [ext_resource path="res://scripts/entities/EntityDataGD.gd" type="Script" id=4] [ext_resource path="res://modules/core/crafting/1_test_craft.tres" type="CraftRecipe" id=5] -[sub_resource type="SimpleLevelStatData" id=43] -agility = 3 -strength = 4 -stamina = 5 -intellect = 6 -spirit = 4 +[sub_resource type="SimpleLevelStatData" id=1] +agility = 4 +strength = 3 +stamina = 6 +intellect = 5 +spirit = 3 -[sub_resource type="StatDataEntry" id=2] -base = 16.0 - -[sub_resource type="StatDataEntry" id=3] -stat_id = 12 - -[sub_resource type="StatDataEntry" id=4] -stat_id = 13 - -[sub_resource type="StatDataEntry" id=5] -stat_id = 19 - -[sub_resource type="StatDataEntry" id=6] -stat_id = 34 - -[sub_resource type="StatDataEntry" id=7] -stat_id = 21 - -[sub_resource type="StatDataEntry" id=8] -stat_id = 24 - -[sub_resource type="StatDataEntry" id=9] -stat_id = 38 - -[sub_resource type="StatDataEntry" id=10] -stat_id = 36 - -[sub_resource type="StatDataEntry" id=11] -stat_id = 31 - -[sub_resource type="StatDataEntry" id=12] -stat_id = 32 - -[sub_resource type="StatDataEntry" id=13] -stat_id = 8 -base = 1.5 - -[sub_resource type="StatDataEntry" id=14] -stat_id = 9 - -[sub_resource type="StatDataEntry" id=15] -stat_id = 10 - -[sub_resource type="StatDataEntry" id=16] -stat_id = 25 - -[sub_resource type="StatDataEntry" id=17] -stat_id = 5 -base = 100.0 - -[sub_resource type="StatDataEntry" id=18] -stat_id = 28 - -[sub_resource type="StatDataEntry" id=19] -stat_id = 3 -base = 18.0 - -[sub_resource type="StatDataEntry" id=20] -stat_id = 33 - -[sub_resource type="StatDataEntry" id=21] -stat_id = 6 -base = 100.0 - -[sub_resource type="StatDataEntry" id=22] -stat_id = 15 - -[sub_resource type="StatDataEntry" id=23] -stat_id = 16 - -[sub_resource type="StatDataEntry" id=24] -stat_id = 26 - -[sub_resource type="StatDataEntry" id=25] -stat_id = 22 - -[sub_resource type="StatDataEntry" id=26] -stat_id = 30 - -[sub_resource type="StatDataEntry" id=27] -stat_id = 20 - -[sub_resource type="StatDataEntry" id=28] -stat_id = 39 - -[sub_resource type="StatDataEntry" id=29] -stat_id = 11 - -[sub_resource type="StatDataEntry" id=30] -stat_id = 29 - -[sub_resource type="StatDataEntry" id=31] -stat_id = 35 - -[sub_resource type="StatDataEntry" id=32] -stat_id = 7 - -[sub_resource type="StatDataEntry" id=33] -stat_id = 17 - -[sub_resource type="StatDataEntry" id=34] -stat_id = 18 - -[sub_resource type="StatDataEntry" id=35] -stat_id = 27 - -[sub_resource type="StatDataEntry" id=36] -stat_id = 23 - -[sub_resource type="StatDataEntry" id=37] -stat_id = 14 - -[sub_resource type="StatDataEntry" id=38] -stat_id = 4 -base = 13.0 - -[sub_resource type="StatDataEntry" id=39] -stat_id = 2 -base = 18.0 - -[sub_resource type="StatDataEntry" id=40] -stat_id = 1 -base = 16.0 - -[sub_resource type="StatDataEntry" id=41] -stat_id = 37 - -[sub_resource type="StatDataEntry" id=42] -stat_id = 40 - -[sub_resource type="StatData" id=44] -level_stat_data = SubResource( 43 ) -stat/agility = SubResource( 2 ) -stat/strength = SubResource( 40 ) -stat/stamina = SubResource( 39 ) -stat/intellect = SubResource( 19 ) -stat/spirit = SubResource( 38 ) -stat/health = SubResource( 17 ) -stat/mana = SubResource( 21 ) -stat/speed = SubResource( 32 ) -stat/global_cooldown = SubResource( 13 ) -stat/haste = SubResource( 14 ) -stat/haste_rating = SubResource( 15 ) -stat/resilience = SubResource( 29 ) -stat/armor = SubResource( 3 ) -stat/attack_power = SubResource( 4 ) -stat/spell_power = SubResource( 37 ) -stat/melee_crit = SubResource( 22 ) -stat/melee_crit_bonus = SubResource( 23 ) -stat/spell_crit = SubResource( 33 ) -stat/spell_crit_bonus = SubResource( 34 ) -stat/block = SubResource( 5 ) -stat/parry = SubResource( 27 ) -stat/damage_reduction = SubResource( 7 ) -stat/melee_damage_reduction = SubResource( 25 ) -stat/spell_damage_reduction = SubResource( 36 ) -stat/damage_taken = SubResource( 8 ) -stat/heal_taken = SubResource( 16 ) -stat/melee_damage = SubResource( 24 ) -stat/spell_damage = SubResource( 35 ) -stat/holy_resist = SubResource( 18 ) -stat/shadow_resist = SubResource( 30 ) -stat/nature_resist = SubResource( 26 ) -stat/fire_resist = SubResource( 11 ) -stat/frost_resist = SubResource( 12 ) -stat/lightning_resist = SubResource( 20 ) -stat/chaos_resist = SubResource( 6 ) -stat/silence_resist = SubResource( 31 ) -stat/fear_resist = SubResource( 10 ) -stat/stun_resist = SubResource( 41 ) -stat/energy = SubResource( 9 ) -stat/rage = SubResource( 28 ) -stat/xp_rate = SubResource( 42 ) +[sub_resource type="StatData" id=2] +level_stat_data = SubResource( 1 ) +stat/agility = 23.0 +stat/strength = 14.0 +stat/stamina = 23.0 +stat/intellect = 19.0 +stat/spirit = 3.0 +stat/health = 100.0 +stat/mana = 100.0 [resource] resource_name = "Naturalist" @@ -195,7 +31,7 @@ entity_controller = 1 is_playable = true text_name = "Naturalist" bag_size = 24 -stat_data = SubResource( 44 ) +stat_data = SubResource( 2 ) entity_species_data = ExtResource( 3 ) entity_class_data = ExtResource( 2 ) craft_recipes = [ ExtResource( 5 ), ExtResource( 1 ) ] diff --git a/game/modules/entity_classes/naturalist/entities/2_naturalist_mob.tres b/game/modules/entity_classes/naturalist/entities/2_naturalist_mob.tres index fb4e08ab..c40f26b3 100644 --- a/game/modules/entity_classes/naturalist/entities/2_naturalist_mob.tres +++ b/game/modules/entity_classes/naturalist/entities/2_naturalist_mob.tres @@ -1,4 +1,4 @@ -[gd_resource type="EntityData" load_steps=48 format=2] +[gd_resource type="EntityData" load_steps=7 format=2] [ext_resource path="res://modules/species/Human/Female/1_human_female.tres" type="EntitySpeciesData" id=1] [ext_resource path="res://modules/entity_classes/naturalist/1_naturalist.tres" type="EntityClassData" id=2] @@ -8,191 +8,28 @@ [sub_resource type="SimpleLevelStatData" id=2] agility = 3 -strength = 4 -stamina = 4 -intellect = 3 +strength = 2 +stamina = 3 +intellect = 4 spirit = 5 -[sub_resource type="StatDataEntry" id=3] -base = 12.0 - -[sub_resource type="StatDataEntry" id=4] -stat_id = 12 - -[sub_resource type="StatDataEntry" id=5] -stat_id = 13 - -[sub_resource type="StatDataEntry" id=6] -stat_id = 19 - -[sub_resource type="StatDataEntry" id=7] -stat_id = 34 - -[sub_resource type="StatDataEntry" id=8] -stat_id = 21 - -[sub_resource type="StatDataEntry" id=9] -stat_id = 24 - -[sub_resource type="StatDataEntry" id=10] -stat_id = 38 - -[sub_resource type="StatDataEntry" id=11] -stat_id = 36 - -[sub_resource type="StatDataEntry" id=12] -stat_id = 31 - -[sub_resource type="StatDataEntry" id=13] -stat_id = 32 - -[sub_resource type="StatDataEntry" id=14] -stat_id = 8 - -[sub_resource type="StatDataEntry" id=15] -stat_id = 9 - -[sub_resource type="StatDataEntry" id=16] -stat_id = 10 - -[sub_resource type="StatDataEntry" id=17] -stat_id = 25 - -[sub_resource type="StatDataEntry" id=18] -stat_id = 5 -base = 60.0 - -[sub_resource type="StatDataEntry" id=19] -stat_id = 28 - -[sub_resource type="StatDataEntry" id=20] -stat_id = 3 -base = 11.0 - -[sub_resource type="StatDataEntry" id=21] -stat_id = 33 - -[sub_resource type="StatDataEntry" id=22] -stat_id = 6 -base = 30.0 - -[sub_resource type="StatDataEntry" id=23] -stat_id = 15 - -[sub_resource type="StatDataEntry" id=24] -stat_id = 16 - -[sub_resource type="StatDataEntry" id=25] -stat_id = 26 - -[sub_resource type="StatDataEntry" id=26] -stat_id = 22 - -[sub_resource type="StatDataEntry" id=27] -stat_id = 30 - -[sub_resource type="StatDataEntry" id=28] -stat_id = 20 - -[sub_resource type="StatDataEntry" id=29] -stat_id = 39 - -[sub_resource type="StatDataEntry" id=30] -stat_id = 11 - -[sub_resource type="StatDataEntry" id=31] -stat_id = 29 - -[sub_resource type="StatDataEntry" id=32] -stat_id = 35 - -[sub_resource type="StatDataEntry" id=33] -stat_id = 7 - -[sub_resource type="StatDataEntry" id=34] -stat_id = 17 - -[sub_resource type="StatDataEntry" id=35] -stat_id = 18 - -[sub_resource type="StatDataEntry" id=36] -stat_id = 27 - -[sub_resource type="StatDataEntry" id=37] -stat_id = 23 - -[sub_resource type="StatDataEntry" id=38] -stat_id = 14 - -[sub_resource type="StatDataEntry" id=39] -stat_id = 4 -base = 8.0 - -[sub_resource type="StatDataEntry" id=40] -stat_id = 2 -base = 13.0 - -[sub_resource type="StatDataEntry" id=41] -stat_id = 1 -base = 14.0 - -[sub_resource type="StatDataEntry" id=42] -stat_id = 37 - -[sub_resource type="StatDataEntry" id=43] -stat_id = 40 - -[sub_resource type="StatData" id=44] +[sub_resource type="StatData" id=3] level_stat_data = SubResource( 2 ) -stat/agility = SubResource( 3 ) -stat/strength = SubResource( 41 ) -stat/stamina = SubResource( 40 ) -stat/intellect = SubResource( 20 ) -stat/spirit = SubResource( 39 ) -stat/health = SubResource( 18 ) -stat/mana = SubResource( 22 ) -stat/speed = SubResource( 33 ) -stat/global_cooldown = SubResource( 14 ) -stat/haste = SubResource( 15 ) -stat/haste_rating = SubResource( 16 ) -stat/resilience = SubResource( 30 ) -stat/armor = SubResource( 4 ) -stat/attack_power = SubResource( 5 ) -stat/spell_power = SubResource( 38 ) -stat/melee_crit = SubResource( 23 ) -stat/melee_crit_bonus = SubResource( 24 ) -stat/spell_crit = SubResource( 34 ) -stat/spell_crit_bonus = SubResource( 35 ) -stat/block = SubResource( 6 ) -stat/parry = SubResource( 28 ) -stat/damage_reduction = SubResource( 8 ) -stat/melee_damage_reduction = SubResource( 26 ) -stat/spell_damage_reduction = SubResource( 37 ) -stat/damage_taken = SubResource( 9 ) -stat/heal_taken = SubResource( 17 ) -stat/melee_damage = SubResource( 25 ) -stat/spell_damage = SubResource( 36 ) -stat/holy_resist = SubResource( 19 ) -stat/shadow_resist = SubResource( 31 ) -stat/nature_resist = SubResource( 27 ) -stat/fire_resist = SubResource( 12 ) -stat/frost_resist = SubResource( 13 ) -stat/lightning_resist = SubResource( 21 ) -stat/chaos_resist = SubResource( 7 ) -stat/silence_resist = SubResource( 32 ) -stat/fear_resist = SubResource( 11 ) -stat/stun_resist = SubResource( 42 ) -stat/energy = SubResource( 10 ) -stat/rage = SubResource( 29 ) -stat/xp_rate = SubResource( 43 ) +stat/agility = 14.0 +stat/strength = 15.0 +stat/stamina = 13.0 +stat/intellect = 13.0 +stat/spirit = 10.0 +stat/health = 20.0 +stat/mana = 20.0 [resource] resource_name = "Naturalist" -id = 1 +id = 2 entity_type = 4 -entity_controller = 1 +entity_controller = 2 text_name = "Naturalist" -stat_data = SubResource( 44 ) +stat_data = SubResource( 3 ) entity_species_data = ExtResource( 1 ) entity_class_data = ExtResource( 2 ) loot_db = SubResource( 1 ) diff --git a/game/modules/entity_classes/naturalist/resource_db.tres b/game/modules/entity_classes/naturalist/resource_db.tres index 17335063..a280be78 100644 --- a/game/modules/entity_classes/naturalist/resource_db.tres +++ b/game/modules/entity_classes/naturalist/resource_db.tres @@ -39,7 +39,6 @@ [ext_resource path="res://modules/entity_classes/naturalist/spells/35_strike.tres" type="Spell" id=37] [ext_resource path="res://modules/entity_classes/naturalist/spells/36_regrow.tres" type="Spell" id=38] - [resource] entity_datas = [ ExtResource( 36 ), ExtResource( 35 ) ] spells = [ ExtResource( 11 ), ExtResource( 5 ), ExtResource( 25 ), ExtResource( 9 ), ExtResource( 23 ), ExtResource( 33 ), ExtResource( 1 ), ExtResource( 13 ), ExtResource( 34 ), ExtResource( 4 ), ExtResource( 30 ), ExtResource( 28 ), ExtResource( 27 ), ExtResource( 31 ), ExtResource( 14 ), ExtResource( 32 ), ExtResource( 26 ), ExtResource( 18 ), ExtResource( 20 ), ExtResource( 19 ), ExtResource( 22 ), ExtResource( 37 ), ExtResource( 38 ) ] diff --git a/game/scripts/auras/aura_script.gd b/game/scripts/auras/aura_script.gd index 676c0d55..efc44031 100644 --- a/game/scripts/auras/aura_script.gd +++ b/game/scripts/auras/aura_script.gd @@ -60,8 +60,7 @@ func _sapply(info : AuraApplyInfo) -> void: for i in range(get_aura_stat_attribute_count()): var stat_attribute : AuraStatAttribute = get_aura_stat_attribute(i) - var stat : Stat = info.target.get_stat(stat_attribute.stat) - stat.add_modifier(id, stat_attribute.base_mod, stat_attribute.bonus_mod, stat_attribute.percent_mod) + info.target.stat_mod(id, stat_attribute.base_mod, stat_attribute.bonus_mod, stat_attribute.percent_mod) if states_add != 0: for i in range(EntityEnums.ENTITY_STATE_TYPE_INDEX_MAX): @@ -79,10 +78,7 @@ func _sapply(info : AuraApplyInfo) -> void: func _sdeapply(data : AuraData) -> void: for i in range(get_aura_stat_attribute_count()): var stat_attribute : AuraStatAttribute = get_aura_stat_attribute(i) - - var stat : Stat = data.owner.get_stat(stat_attribute.stat) - - stat.remove_modifier(id) + data.owner.stat_mod(id, -stat_attribute.base_mod, -stat_attribute.bonus_mod, -stat_attribute.percent_mod) if states_add != 0: for i in range(EntityEnums.ENTITY_STATE_TYPE_INDEX_MAX): diff --git a/game/scripts/resources/HealthResource.gd b/game/scripts/resources/HealthResource.gd index 70c7e7af..20b24795 100644 --- a/game/scripts/resources/HealthResource.gd +++ b/game/scripts/resources/HealthResource.gd @@ -32,15 +32,15 @@ func _init(): func _ons_added(entity): refresh() -func _notification_sstat_changed(stat : Stat): - if stat.id == stamina_stat_id || stat.id == health_stat_id: +func _notification_sstat_changed(stat_id : int, value : float): + if stat_id == stamina_stat_id || stat_id == health_stat_id: refresh() func refresh(): - var stamina : Stat = owner.get_stat(stamina_stat_id) - var health : Stat = owner.get_stat(health_stat_id) + var stamina : int = owner.stat_gets_current(stamina_stat_id) + var health : int = owner.stat_gets_current(health_stat_id) - max_value = int(stamina.scurrent) * 10 + int(health.scurrent) + max_value = int(stamina) * 10 + int(health) #todo fix this if this solution works well current_value = max_value diff --git a/game/scripts/resources/ManaResource.gd b/game/scripts/resources/ManaResource.gd index 8f53c1ca..383f6f80 100644 --- a/game/scripts/resources/ManaResource.gd +++ b/game/scripts/resources/ManaResource.gd @@ -36,27 +36,27 @@ func _init(): func _ons_added(entity): refresh() -func _notification_sstat_changed(stat : Stat): - if stat.id == int_id || stat.id == spirit_id: +func _notification_sstat_changed(stat_id : int, value : float): + if stat_id == int_id || stat_id == spirit_id: refresh() func refresh(): - var intellect : Stat = owner.get_stat(int_id) - var spirit : Stat = owner.get_stat(spirit_id) + var intellect : int = owner.stat_gets_current(int_id) + var spirit : int = owner.stat_gets_current(spirit_id) var m : bool = false if max_value == current_value: m = true - var nv : int = int(intellect.scurrent) * 10 + var nv : int = int(intellect) * 10 max_value = nv if m: current_value = nv - mana_regen = int(spirit.scurrent) + mana_regen = int(spirit) func _process_server(delta): timer += delta diff --git a/game/scripts/resources/SpeedResource.gd b/game/scripts/resources/SpeedResource.gd index 6c429bc6..6cecc29b 100644 --- a/game/scripts/resources/SpeedResource.gd +++ b/game/scripts/resources/SpeedResource.gd @@ -33,12 +33,12 @@ func _init(): func _ons_added(entity): refresh() -func _notification_sstat_changed(stat : Stat): - if stat.id == speed_stat_id: +func _notification_sstat_changed(stat_id : int, value : float): + if stat_id == speed_stat_id: refresh() func refresh(): - var speed_stat : Stat = owner.get_stat(speed_stat_id) + var speed_stat : int = owner.stat_gets_current(speed_stat_id) - current_value = base_value + speed_stat.scurrent * 0.01 + current_value = base_value + speed_stat * 0.01