Comment out a few methods in Aura, as they were implementing spell scaling over c++. Also update ESS so auras don't complain if the original caster is no more.

This commit is contained in:
Relintai 2020-07-16 16:03:43 +02:00
parent 81b8a73a80
commit 7851faa9ab
2 changed files with 63 additions and 63 deletions

2
HEADS
View File

@ -1 +1 @@
{"engine": {"3.2": "07b24de868457c0a190c88771e99ff09e5451c3b"}, "world_generator": {"master": "9a4f9f9809cb4da6d0196a9b37ea480e3cd0c400"}, "entity_spell_system": {"master": "9839cb49721f2d9a37670d6040a4f56ce26001fe"}, "ui_extensions": {"master": "6fe4f69fea8d71043b08d959b8085404c9c4fe47"}, "texture_packer": {"master": "2993ed34f34cfa6a5e61b7913380231e9c55eda6"}, "fastnoise": {"master": "d0e3f1c759332cf0d9a5d7e0e71d0b0278310651"}, "thread_pool": {"master": "93320fe864128d706bcc47fc7ed0731e6e9bcf69"}}
{"engine": {"3.2": "07b24de868457c0a190c88771e99ff09e5451c3b"}, "world_generator": {"master": "9a4f9f9809cb4da6d0196a9b37ea480e3cd0c400"}, "entity_spell_system": {"master": "f6f125b92c05ad12fed573d5568b5384a548fea5"}, "ui_extensions": {"master": "6fe4f69fea8d71043b08d959b8085404c9c4fe47"}, "texture_packer": {"master": "2993ed34f34cfa6a5e61b7913380231e9c55eda6"}, "fastnoise": {"master": "d0e3f1c759332cf0d9a5d7e0e71d0b0278310651"}, "thread_pool": {"master": "93320fe864128d706bcc47fc7ed0731e6e9bcf69"}}

View File

@ -21,69 +21,69 @@ class_name AuraGD
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
func _handle_aura_damage(aura_data : AuraData, damage_info : SpellDamageInfo) -> void:
randomize()
#
#func _handle_aura_damage(aura_data : AuraData, damage_info : SpellDamageInfo) -> void:
# randomize()
#
# if damage_info.dealer == null:
# printerr("_handle_aura_damage: damage_info.dealer is null! ")
# return
#
# damage_info.damage = damage_min + (randi() % (damage_max - damage_min))
#
# if scale_with_level:
# damage_info.damage *= int(float(damage_info.dealer.scharacter_level) / float(EntityEnums.MAX_CHARACTER_LEVEL))
#
# damage_info.damage_source_type = aura_data.aura.damage_type
#
# if (is_instance_valid(damage_info.dealer)):
# damage_info.dealer.sdeal_damage_to(damage_info)
#
#func _handle_aura_heal(aura_data : AuraData, shi : SpellHealInfo) -> void:
# randomize()
#
# shi.heal = heal_min + (randi() % (heal_max - heal_min))
# shi.damage *= shi.dealer.scharacter_level / float(EntityEnums.MAX_CHARACTER_LEVEL)
# shi.heal_source_type = aura_data.aura.aura_type
#
# shi.dealer.sdeal_heal_to(shi)
#
#func _sapply(info : AuraApplyInfo) -> void:
## var add : bool = false
# var ad : AuraData = info.target.aura_gets_by(info.caster, info.aura.id)
#
# if ad == null:
## add = true
# ad = AuraData.new()
#
# setup_aura_data(ad, info);
#
# for i in range(stat_attribute_get_count()):
# info.target.stat_mod(id, stat_attribute_get_base_mod(i), stat_attribute_get_bonus_mod(i), stat_attribute_get_percent_mod(i))
#
# if states_add != 0:
# for i in range(EntityEnums.ENTITY_STATE_TYPE_INDEX_MAX):
# var t : int = 1 << i
#
# if states_add & t != 0:
# info.target.adds_state_ref(i)
#
#
# info.target.aura_adds(ad);
# else:
# ad.remaining_time = time
#
if damage_info.dealer == null:
printerr("_handle_aura_damage: damage_info.dealer is null! ")
return
damage_info.damage = damage_min + (randi() % (damage_max - damage_min))
if scale_with_level:
damage_info.damage *= int(float(damage_info.dealer.scharacter_level) / float(EntityEnums.MAX_CHARACTER_LEVEL))
damage_info.damage_source_type = aura_data.aura.damage_type
if (is_instance_valid(damage_info.dealer)):
damage_info.dealer.sdeal_damage_to(damage_info)
func _handle_aura_heal(aura_data : AuraData, shi : SpellHealInfo) -> void:
randomize()
shi.heal = heal_min + (randi() % (heal_max - heal_min))
shi.damage *= shi.dealer.scharacter_level / float(EntityEnums.MAX_CHARACTER_LEVEL)
shi.heal_source_type = aura_data.aura.aura_type
shi.dealer.sdeal_heal_to(shi)
func _sapply(info : AuraApplyInfo) -> void:
# var add : bool = false
var ad : AuraData = info.target.aura_gets_by(info.caster, info.aura.id)
if ad == null:
# add = true
ad = AuraData.new()
setup_aura_data(ad, info);
for i in range(stat_attribute_get_count()):
info.target.stat_mod(id, stat_attribute_get_base_mod(i), stat_attribute_get_bonus_mod(i), stat_attribute_get_percent_mod(i))
if states_add != 0:
for i in range(EntityEnums.ENTITY_STATE_TYPE_INDEX_MAX):
var t : int = 1 << i
if states_add & t != 0:
info.target.adds_state_ref(i)
info.target.aura_adds(ad);
else:
ad.remaining_time = time
func _sdeapply(data : AuraData) -> void:
for i in range(stat_attribute_get_count()):
data.owner.stat_mod(id, stat_attribute_get_base_mod(i), stat_attribute_get_bonus_mod(i), stat_attribute_get_percent_mod(i))
if states_add != 0:
for i in range(EntityEnums.ENTITY_STATE_TYPE_INDEX_MAX):
var t : int = 1 << i
if states_add & t != 0:
data.owner.removes_state_ref(i)
#func _sdeapply(data : AuraData) -> void:
# for i in range(stat_attribute_get_count()):
# data.owner.stat_mod(id, stat_attribute_get_base_mod(i), stat_attribute_get_bonus_mod(i), stat_attribute_get_percent_mod(i))
#
# if states_add != 0:
# for i in range(EntityEnums.ENTITY_STATE_TYPE_INDEX_MAX):
# var t : int = 1 << i
#
# if states_add & t != 0:
# data.owner.removes_state_ref(i)
func _con_aura_added(data : AuraData) -> void:
if data.owner.get_character_skeleton() == null or data.owner.get_character_skeleton().root_attach_point == null: