mirror of
https://github.com/Relintai/broken_seals.git
synced 2024-11-13 20:47:19 +01:00
Update everything to the latest.
This commit is contained in:
parent
3044cb8275
commit
3cce5a2b3e
2
HEADS
2
HEADS
@ -1 +1 @@
|
|||||||
{"engine": "8eef6d280b42f098e15d0e1e6acf8189ae4be489", "world_generator": "09372b146936fda509f5c23a522e998d12f38e13", "entity_spell_system": "74eb8bcb2fb0b6ade73e5678144e1bfe81b3d4db", "ui_extensions": "38acc650db260a831dc26ca96fe9d9a087230bdc", "voxelman": "db77530ec1b70861fb2e3783d3ea6ba75a4ac793", "texture_packer": "7bff901e4946b903a73b266d6a02c317f079ab33", "fastnoise": "41b7ea05a1f7aa2b8ecddaa1fd739e64d6970f7e", "entity-spell-system-addons": "d60e746b158d3ebf9d2ea306af1dd24bcae49be5", "mesh_data_resource": "4bda19b12be2c2a79a6121de6d22e48f3934e726", "ess_data": "3bd637fdd3304b64a18287a49a6b7387acf2f5de", "prop_tool": "df438053ebc900966f8f842fc65f0264f1271d49", "procedural_animations": "9c287b9e54dc8d306668a6118a6d2c78415eb8de", "fast_quadratic_mesh_simplifier": "63d55b154967321212a6426e9b327c95e007785d"}
|
{"engine": "188dc714b000bbdb086513dcff3dd4bc4f75a0e7", "world_generator": "09372b146936fda509f5c23a522e998d12f38e13", "entity_spell_system": "29a26d9774ba6c05858aba6b5fe442c282bbd117", "ui_extensions": "38acc650db260a831dc26ca96fe9d9a087230bdc", "voxelman": "db77530ec1b70861fb2e3783d3ea6ba75a4ac793", "texture_packer": "7bff901e4946b903a73b266d6a02c317f079ab33", "fastnoise": "41b7ea05a1f7aa2b8ecddaa1fd739e64d6970f7e", "entity-spell-system-addons": "d60e746b158d3ebf9d2ea306af1dd24bcae49be5", "mesh_data_resource": "4bda19b12be2c2a79a6121de6d22e48f3934e726", "ess_data": "3bd637fdd3304b64a18287a49a6b7387acf2f5de", "prop_tool": "df438053ebc900966f8f842fc65f0264f1271d49", "procedural_animations": "9c287b9e54dc8d306668a6118a6d2c78415eb8de", "fast_quadratic_mesh_simplifier": "63d55b154967321212a6426e9b327c95e007785d"}
|
@ -21,66 +21,6 @@ class_name AuraGD
|
|||||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
# SOFTWARE.
|
# SOFTWARE.
|
||||||
|
|
||||||
func _handle_aura_damage(aura_data : AuraData, damage_info : SpellDamageInfo) -> void:
|
|
||||||
randomize()
|
|
||||||
|
|
||||||
damage_info.damage = damage_min + (randi() % (damage_max - damage_min))
|
|
||||||
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.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.sget_aura_by(info.caster, info.aura.id)
|
|
||||||
|
|
||||||
if ad == null:
|
|
||||||
# add = true
|
|
||||||
ad = AuraData.new()
|
|
||||||
|
|
||||||
setup_aura_data(ad, info);
|
|
||||||
|
|
||||||
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_enum(stat_attribute.stat)
|
|
||||||
stat.add_modifier(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):
|
|
||||||
var t : int = 1 << i
|
|
||||||
|
|
||||||
if states_add & t != 0:
|
|
||||||
info.target.sadd_state_ref(i)
|
|
||||||
|
|
||||||
|
|
||||||
info.target.sadd_aura(ad);
|
|
||||||
else:
|
|
||||||
ad.remaining_time = time
|
|
||||||
|
|
||||||
|
|
||||||
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_enum(stat_attribute.stat)
|
|
||||||
|
|
||||||
stat.remove_modifier(id)
|
|
||||||
|
|
||||||
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.sremove_state_ref(i)
|
|
||||||
|
|
||||||
func _con_aura_added(data : AuraData) -> void:
|
func _con_aura_added(data : AuraData) -> void:
|
||||||
if data.owner.get_character_skeleton() == null or data.owner.get_character_skeleton().root_attach_point == null:
|
if data.owner.get_character_skeleton() == null or data.owner.get_character_skeleton().root_attach_point == null:
|
||||||
return
|
return
|
||||||
|
@ -21,137 +21,6 @@ class_name SpellGD
|
|||||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
# SOFTWARE.
|
# SOFTWARE.
|
||||||
|
|
||||||
func _sstart_casting(info : SpellCastInfo) -> void:
|
|
||||||
if info.caster.sis_casting():
|
|
||||||
return
|
|
||||||
|
|
||||||
if info.spell.cooldown_global_cooldown_enabled and info.caster.gets_has_global_cooldown() or info.caster.hass_category_cooldown(spell_type) or info.caster.hass_cooldown(id):
|
|
||||||
return
|
|
||||||
|
|
||||||
if !info.caster.hass_spell(self):
|
|
||||||
return
|
|
||||||
|
|
||||||
if cast_enabled:
|
|
||||||
info.caster.sstart_casting(info)
|
|
||||||
return
|
|
||||||
|
|
||||||
info.caster.sspell_cast_success(info)
|
|
||||||
|
|
||||||
if info.target:
|
|
||||||
info.target.son_cast_finished_target(info)
|
|
||||||
|
|
||||||
handle_cooldown(info)
|
|
||||||
|
|
||||||
if projectile != null:
|
|
||||||
fire_projectile(info)
|
|
||||||
else:
|
|
||||||
handle_effect(info)
|
|
||||||
|
|
||||||
handle_gcd(info)
|
|
||||||
|
|
||||||
func _sfinish_cast(info : SpellCastInfo) -> void:
|
|
||||||
info.caster.son_cast_finished(info)
|
|
||||||
info.caster.sspell_cast_success(info)
|
|
||||||
|
|
||||||
if is_instance_valid(info.target):
|
|
||||||
info.target.son_cast_finished_target(info)
|
|
||||||
|
|
||||||
if projectile != null:
|
|
||||||
fire_projectile(info)
|
|
||||||
else:
|
|
||||||
handle_effect(info)
|
|
||||||
|
|
||||||
handle_cooldown(info)
|
|
||||||
|
|
||||||
func _son_cast_player_moved(info):
|
|
||||||
if !cast_can_move_while_casting:
|
|
||||||
info.caster.sfail_cast()
|
|
||||||
|
|
||||||
func fire_projectile(info : SpellCastInfo):
|
|
||||||
pass
|
|
||||||
# if projectile_type == SPELL_PROJECTILE_TYPE_FOLLOW:
|
|
||||||
# var sp : WorldSpellGD = WorldSpellGD.new()
|
|
||||||
#
|
|
||||||
# info.get_caster().get_parent().add_child(sp)
|
|
||||||
# sp.owner = info.get_caster().get_parent()
|
|
||||||
#
|
|
||||||
# sp.launch(info, projectile, projectile_speed)
|
|
||||||
|
|
||||||
func _son_spell_hit(info):
|
|
||||||
handle_effect(info)
|
|
||||||
|
|
||||||
func handle_effect(info : SpellCastInfo) -> void:
|
|
||||||
if target_type == SPELL_TARGET_TYPE_TARGET:
|
|
||||||
if info.target == null:
|
|
||||||
return
|
|
||||||
|
|
||||||
# var ok : bool = false
|
|
||||||
|
|
||||||
# if (target_relation_type & TARGET_SELF):
|
|
||||||
# ok = true
|
|
||||||
|
|
||||||
# if not ok and (target_relation_type & TARGET_ENEMY and info.target is Entity):
|
|
||||||
# ok = true
|
|
||||||
#
|
|
||||||
# if not ok and (target_relation_type & TARGET_FRIENDLY and info.target is Player):
|
|
||||||
# ok = true
|
|
||||||
|
|
||||||
# if not ok:
|
|
||||||
# return
|
|
||||||
|
|
||||||
elif target_type == SPELL_TARGET_TYPE_SELF:
|
|
||||||
info.target = info.caster
|
|
||||||
|
|
||||||
if damage_enabled and info.target:
|
|
||||||
var sdi : SpellDamageInfo = SpellDamageInfo.new()
|
|
||||||
|
|
||||||
sdi.damage_source = self
|
|
||||||
sdi.dealer = info.caster
|
|
||||||
sdi.receiver = info.target
|
|
||||||
|
|
||||||
handle_spell_damage(sdi)
|
|
||||||
|
|
||||||
for aura in caster_aura_applys:
|
|
||||||
var ainfo : AuraApplyInfo = AuraApplyInfo.new()
|
|
||||||
|
|
||||||
ainfo.caster = info.caster
|
|
||||||
ainfo.target = info.caster
|
|
||||||
ainfo.spell_scale = 1
|
|
||||||
ainfo.aura = aura
|
|
||||||
|
|
||||||
aura.sapply(ainfo)
|
|
||||||
|
|
||||||
if info.target != null:
|
|
||||||
for aura in target_aura_applys:
|
|
||||||
var ad : AuraData = null
|
|
||||||
|
|
||||||
if aura.aura_group != null:
|
|
||||||
ad = info.target.sget_aura_with_group_by(info.caster, aura.aura_group)
|
|
||||||
else:
|
|
||||||
ad = info.target.sget_aura_by(info.caster, aura.get_id())
|
|
||||||
|
|
||||||
if ad != null:
|
|
||||||
info.target.sremove_aura_exact(ad)
|
|
||||||
|
|
||||||
var ainfo : AuraApplyInfo = AuraApplyInfo.new()
|
|
||||||
|
|
||||||
ainfo.caster = info.caster
|
|
||||||
ainfo.target = info.target
|
|
||||||
ainfo.spell_scale = 1
|
|
||||||
ainfo.aura = aura
|
|
||||||
|
|
||||||
aura.sapply(ainfo)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
func handle_cooldown(info : SpellCastInfo) -> void:
|
|
||||||
if cooldown_cooldown > 0:
|
|
||||||
info.caster.adds_cooldown(id, cooldown_cooldown)
|
|
||||||
|
|
||||||
func handle_gcd(info : SpellCastInfo) -> void:
|
|
||||||
if cooldown_global_cooldown_enabled and cast_cast_time < 0.01:
|
|
||||||
info.caster.sstart_global_cooldown(info.caster.get_gcd().scurrent)
|
|
||||||
|
|
||||||
func add_spell_cast_effect(info : SpellCastInfo) -> void:
|
func add_spell_cast_effect(info : SpellCastInfo) -> void:
|
||||||
var basic_spell_effect : SpellEffectVisualBasic = visual_spell_effects as SpellEffectVisualBasic
|
var basic_spell_effect : SpellEffectVisualBasic = visual_spell_effects as SpellEffectVisualBasic
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user