Spells, fonts, and animations
- Fixed bugs with animations - Added spell defenses - Experimented with alternate fonts
This commit is contained in:
parent
2990500e27
commit
256e070818
BIN
Fonts/Alkhemikal.ttf
Normal file
BIN
Fonts/Alkhemikal.ttf
Normal file
Binary file not shown.
38
Fonts/Alkhemikal.ttf.import
Normal file
38
Fonts/Alkhemikal.ttf.import
Normal file
@ -0,0 +1,38 @@
|
||||
[remap]
|
||||
|
||||
importer="font_data_dynamic"
|
||||
type="FontFile"
|
||||
uid="uid://cnfikwk4ced8d"
|
||||
path="res://.godot/imported/Alkhemikal.ttf-963aeec8bf782fa0dbc26d79e0b278b7.fontdata"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Fonts/Alkhemikal.ttf"
|
||||
dest_files=["res://.godot/imported/Alkhemikal.ttf-963aeec8bf782fa0dbc26d79e0b278b7.fontdata"]
|
||||
|
||||
[params]
|
||||
|
||||
Rendering=null
|
||||
antialiasing=1
|
||||
generate_mipmaps=false
|
||||
multichannel_signed_distance_field=false
|
||||
msdf_pixel_range=8
|
||||
msdf_size=48
|
||||
allow_system_fallback=true
|
||||
force_autohinter=false
|
||||
hinting=1
|
||||
subpixel_positioning=1
|
||||
oversampling=10.0
|
||||
Fallbacks=null
|
||||
fallbacks=[]
|
||||
Compress=null
|
||||
compress=true
|
||||
preload=[{
|
||||
"chars": [],
|
||||
"glyphs": [],
|
||||
"name": "New Configuration",
|
||||
"size": Vector2i(16, 0)
|
||||
}]
|
||||
language_support={}
|
||||
script_support={}
|
||||
opentype_features={}
|
BIN
Fonts/Jacquard_12/Jacquard12-Regular.ttf
Normal file
BIN
Fonts/Jacquard_12/Jacquard12-Regular.ttf
Normal file
Binary file not shown.
38
Fonts/Jacquard_12/Jacquard12-Regular.ttf.import
Normal file
38
Fonts/Jacquard_12/Jacquard12-Regular.ttf.import
Normal file
@ -0,0 +1,38 @@
|
||||
[remap]
|
||||
|
||||
importer="font_data_dynamic"
|
||||
type="FontFile"
|
||||
uid="uid://deypiae05fexw"
|
||||
path="res://.godot/imported/Jacquard12-Regular.ttf-f64061e4e68b2ac7317880d65514240e.fontdata"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Fonts/Jacquard_12/Jacquard12-Regular.ttf"
|
||||
dest_files=["res://.godot/imported/Jacquard12-Regular.ttf-f64061e4e68b2ac7317880d65514240e.fontdata"]
|
||||
|
||||
[params]
|
||||
|
||||
Rendering=null
|
||||
antialiasing=1
|
||||
generate_mipmaps=false
|
||||
multichannel_signed_distance_field=false
|
||||
msdf_pixel_range=8
|
||||
msdf_size=48
|
||||
allow_system_fallback=true
|
||||
force_autohinter=false
|
||||
hinting=1
|
||||
subpixel_positioning=1
|
||||
oversampling=10.0
|
||||
Fallbacks=null
|
||||
fallbacks=[]
|
||||
Compress=null
|
||||
compress=true
|
||||
preload=[{
|
||||
"chars": [],
|
||||
"glyphs": [],
|
||||
"name": "New Configuration",
|
||||
"size": Vector2i(16, 0)
|
||||
}]
|
||||
language_support={}
|
||||
script_support={}
|
||||
opentype_features={}
|
93
Fonts/Jacquard_12/OFL.txt
Normal file
93
Fonts/Jacquard_12/OFL.txt
Normal file
@ -0,0 +1,93 @@
|
||||
Copyright 2023 The Soft Type Project Authors (https://github.com/scfried/soft-type-jacquard)
|
||||
|
||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||
This license is copied below, and is also available with a FAQ at:
|
||||
https://openfontlicense.org
|
||||
|
||||
|
||||
-----------------------------------------------------------
|
||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
-----------------------------------------------------------
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||
development of collaborative font projects, to support the font creation
|
||||
efforts of academic and linguistic communities, and to provide a free and
|
||||
open framework in which fonts may be shared and improved in partnership
|
||||
with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and
|
||||
redistributed freely as long as they are not sold by themselves. The
|
||||
fonts, including any derivative works, can be bundled, embedded,
|
||||
redistributed and/or sold with any software provided that any reserved
|
||||
names are not used by derivative works. The fonts and derivatives,
|
||||
however, cannot be released under any other type of license. The
|
||||
requirement for fonts to remain under this license does not apply
|
||||
to any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright
|
||||
Holder(s) under this license and clearly marked as such. This may
|
||||
include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the
|
||||
copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software components as
|
||||
distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||
or substituting -- in part or in whole -- any of the components of the
|
||||
Original Version, by changing formats or by porting the Font Software to a
|
||||
new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical
|
||||
writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||
redistribute, and sell modified and unmodified copies of the Font
|
||||
Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components,
|
||||
in Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled,
|
||||
redistributed and/or sold with any software, provided that each copy
|
||||
contains the above copyright notice and this license. These can be
|
||||
included either as stand-alone text files, human-readable headers or
|
||||
in the appropriate machine-readable metadata fields within text or
|
||||
binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font
|
||||
Name(s) unless explicit written permission is granted by the corresponding
|
||||
Copyright Holder. This restriction only applies to the primary font name as
|
||||
presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||
Software shall not be used to promote, endorse or advertise any
|
||||
Modified Version, except to acknowledge the contribution(s) of the
|
||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||
permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole,
|
||||
must be distributed entirely under this license, and must not be
|
||||
distributed under any other license. The requirement for fonts to
|
||||
remain under this license does not apply to any document created
|
||||
using the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are
|
||||
not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
@ -1,15 +1,16 @@
|
||||
[gd_resource type="Resource" script_class="Spellbook" load_steps=5 format=3 uid="uid://g86hap7s43n8"]
|
||||
[gd_resource type="Resource" script_class="Spellbook" load_steps=6 format=3 uid="uid://g86hap7s43n8"]
|
||||
|
||||
[ext_resource type="Script" path="res://Resources/spellbook.gd" id="1_pn4te"]
|
||||
[ext_resource type="Resource" uid="uid://dl6nv6lp460n3" path="res://Resources/Spells/rockThrow.tres" id="2_ofx8j"]
|
||||
[ext_resource type="Resource" uid="uid://bmpu6k55bckdv" path="res://Resources/Spells/fireball.tres" id="3_brupg"]
|
||||
[ext_resource type="Resource" uid="uid://1xbik4qndtkh" path="res://Resources/Spells/firebolt.tres" id="4_chcd4"]
|
||||
[ext_resource type="Resource" uid="uid://c6mwbnutxm3vb" path="res://Resources/Spells/icyWind.tres" id="5_6ued7"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_pn4te")
|
||||
name = "Wizard Spellbook"
|
||||
description = "A spellbook used by wizards"
|
||||
spells = Array[Resource("res://Resources/spell.gd")]([ExtResource("2_ofx8j"), ExtResource("3_brupg"), ExtResource("4_chcd4")])
|
||||
spells = Array[Resource("res://Resources/spell.gd")]([ExtResource("2_ofx8j"), ExtResource("3_brupg"), ExtResource("4_chcd4"), ExtResource("5_6ued7")])
|
||||
damageMod = 1.2
|
||||
defenseMod = 1.2
|
||||
element = 0
|
||||
|
@ -16,3 +16,10 @@ element = 1
|
||||
stunning = true
|
||||
timeout = 5.0
|
||||
cooldown = 10.0
|
||||
blockStrength = {
|
||||
0: 0.4,
|
||||
1: 0.6,
|
||||
2: 0.4,
|
||||
3: 0.2,
|
||||
4: 0.7
|
||||
}
|
||||
|
@ -12,8 +12,14 @@ animation = "res://Scenes/Animations/fireboltAnim.tscn"
|
||||
damage = 1.0
|
||||
backfireStrength = 1.0
|
||||
castCombo = Array[String](["up", "down", "down"])
|
||||
castProgress = 0
|
||||
element = 1
|
||||
stunning = false
|
||||
timeout = 10.0
|
||||
cooldown = 2.0
|
||||
blockStrength = {
|
||||
0: 1.0,
|
||||
1: 1.0,
|
||||
2: 1.0,
|
||||
3: 1.0,
|
||||
4: 1.0
|
||||
}
|
||||
|
@ -16,3 +16,10 @@ element = 2
|
||||
stunning = false
|
||||
timeout = 5.0
|
||||
cooldown = 5.0
|
||||
blockStrength = {
|
||||
0: 0.9,
|
||||
1: 0.6,
|
||||
2: 0.9,
|
||||
3: 0.9,
|
||||
4: 1.0
|
||||
}
|
||||
|
@ -12,8 +12,14 @@ animation = ""
|
||||
damage = 10.0
|
||||
backfireStrength = 8.0
|
||||
castCombo = Array[String](["left", "up", "right", "down", "left", "up", "right", "down", "up", "down"])
|
||||
castProgress = 0
|
||||
element = 1
|
||||
stunning = true
|
||||
timeout = 4.0
|
||||
cooldown = 10.0
|
||||
blockStrength = {
|
||||
0: 1.0,
|
||||
1: 1.0,
|
||||
2: 1.0,
|
||||
3: 1.0,
|
||||
4: 1.0
|
||||
}
|
||||
|
@ -16,3 +16,10 @@ element = 4
|
||||
stunning = true
|
||||
timeout = 10.0
|
||||
cooldown = 2.0
|
||||
blockStrength = {
|
||||
0: 0.8,
|
||||
1: 0.8,
|
||||
2: 0.8,
|
||||
3: 0.9,
|
||||
4: 0.6
|
||||
}
|
||||
|
@ -14,3 +14,10 @@ class_name Spell
|
||||
@export var stunning: bool
|
||||
@export var timeout: float = 10
|
||||
@export var cooldown: float = 1
|
||||
@export var blockStrength: Dictionary = {
|
||||
Data.Element.NORMAL: 1.0,
|
||||
Data.Element.FIRE: 1.0,
|
||||
Data.Element.ICE: 1.0,
|
||||
Data.Element.POISON: 1.0,
|
||||
Data.Element.STONE: 1.0
|
||||
}
|
||||
|
@ -482,10 +482,23 @@ tracks/1/keys = {
|
||||
"update": 0,
|
||||
"values": [Vector2(0.2, 0.2)]
|
||||
}
|
||||
tracks/2/type = "value"
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/path = NodePath("AnimatedSprite2D:visible")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [false]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_wf5px"]
|
||||
resource_name = "attackInverse0"
|
||||
length = 0.1
|
||||
step = 0.01
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
@ -510,6 +523,18 @@ tracks/1/keys = {
|
||||
"update": 0,
|
||||
"values": [Vector2(1e-05, 1e-05), Vector2(0.2, 0.2)]
|
||||
}
|
||||
tracks/2/type = "value"
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/path = NodePath("AnimatedSprite2D:visible")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
"times": PackedFloat32Array(0.01),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [true]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_yy8ft"]
|
||||
resource_name = "attackInverse1"
|
||||
@ -662,6 +687,7 @@ tracks/0/keys = {
|
||||
[sub_resource type="Animation" id="Animation_r8anb"]
|
||||
resource_name = "attackSegment0"
|
||||
length = 0.1
|
||||
step = 0.01
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
@ -686,6 +712,18 @@ tracks/1/keys = {
|
||||
"update": 0,
|
||||
"values": [Vector2(1e-05, 1e-05), Vector2(0.2, 0.2)]
|
||||
}
|
||||
tracks/2/type = "value"
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/path = NodePath("AnimatedSprite2D:visible")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
"times": PackedFloat32Array(0.01),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [true]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_7m6oo"]
|
||||
resource_name = "attackSegment1"
|
||||
@ -868,6 +906,7 @@ process_material = SubResource("ParticleProcessMaterial_cjfl8")
|
||||
texture = ExtResource("3_unynm")
|
||||
|
||||
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
|
||||
visible = false
|
||||
position = Vector2(253, 241)
|
||||
scale = Vector2(0.2, 0.2)
|
||||
sprite_frames = SubResource("SpriteFrames_xup3y")
|
||||
|
@ -67,10 +67,23 @@ tracks/4/keys = {
|
||||
"update": 0,
|
||||
"values": [1.5708]
|
||||
}
|
||||
tracks/5/type = "value"
|
||||
tracks/5/imported = false
|
||||
tracks/5/enabled = true
|
||||
tracks/5/path = NodePath("AnimatedSprite2D:visible")
|
||||
tracks/5/interp = 1
|
||||
tracks/5/loop_wrap = true
|
||||
tracks/5/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [false]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_2vt5j"]
|
||||
resource_name = "attackSegment0"
|
||||
[sub_resource type="Animation" id="Animation_ydjfu"]
|
||||
resource_name = "attackInverse0"
|
||||
length = 0.35
|
||||
step = 0.01
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
@ -93,7 +106,116 @@ tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0, 0.2),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [Vector2(1e-05, 1e-05), Vector2(1, 1)]
|
||||
"values": [Vector2(1e-05, 1e-05), Vector2(1.5, 1.5)]
|
||||
}
|
||||
tracks/2/type = "value"
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/path = NodePath("AnimatedSprite2D:position")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Vector2(800, 282)]
|
||||
}
|
||||
tracks/3/type = "value"
|
||||
tracks/3/imported = false
|
||||
tracks/3/enabled = true
|
||||
tracks/3/path = NodePath("AnimatedSprite2D:rotation")
|
||||
tracks/3/interp = 1
|
||||
tracks/3/loop_wrap = true
|
||||
tracks/3/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [1.5708]
|
||||
}
|
||||
tracks/4/type = "value"
|
||||
tracks/4/imported = false
|
||||
tracks/4/enabled = true
|
||||
tracks/4/path = NodePath("AnimatedSprite2D:visible")
|
||||
tracks/4/interp = 1
|
||||
tracks/4/loop_wrap = true
|
||||
tracks/4/keys = {
|
||||
"times": PackedFloat32Array(0.01),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [true]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_wbjam"]
|
||||
resource_name = "attackInverse1"
|
||||
length = 0.3
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("AnimatedSprite2D:speed_scale")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 0.3),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [1.0, 2.0]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_yiill"]
|
||||
resource_name = "attackInverse2"
|
||||
length = 0.5
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("AnimatedSprite2D:animation")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 0.1),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 1,
|
||||
"values": [&"charging", &"fire"]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("AnimatedSprite2D:position")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0.1, 0.5),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [Vector2(800, 282), Vector2(320, 304)]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_2vt5j"]
|
||||
resource_name = "attackSegment0"
|
||||
length = 0.35
|
||||
step = 0.01
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("AnimatedSprite2D:speed_scale")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 0.3),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [0.5, 1.0]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("AnimatedSprite2D:scale")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0, 0.2),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [Vector2(1e-05, 1e-05), Vector2(1.5, 1.5)]
|
||||
}
|
||||
tracks/2/type = "value"
|
||||
tracks/2/imported = false
|
||||
@ -119,6 +241,18 @@ tracks/3/keys = {
|
||||
"update": 0,
|
||||
"values": [-1.5708]
|
||||
}
|
||||
tracks/4/type = "value"
|
||||
tracks/4/imported = false
|
||||
tracks/4/enabled = true
|
||||
tracks/4/path = NodePath("AnimatedSprite2D:visible")
|
||||
tracks/4/interp = 1
|
||||
tracks/4/loop_wrap = true
|
||||
tracks/4/keys = {
|
||||
"times": PackedFloat32Array(0.01),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 1,
|
||||
"values": [true]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_jr20i"]
|
||||
resource_name = "attackSegment1"
|
||||
@ -166,7 +300,7 @@ tracks/1/keys = {
|
||||
|
||||
[sub_resource type="Animation" id="Animation_budh2"]
|
||||
resource_name = "die"
|
||||
length = 0.1
|
||||
length = 0.5
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
@ -204,102 +338,6 @@ tracks/2/keys = {
|
||||
"values": [Vector2(0.1, 0.1)]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_ydjfu"]
|
||||
resource_name = "attackInverse0"
|
||||
length = 0.35
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("AnimatedSprite2D:speed_scale")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 0.3),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [0.5, 1.0]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("AnimatedSprite2D:scale")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0, 0.2),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [Vector2(1e-05, 1e-05), Vector2(2, 2)]
|
||||
}
|
||||
tracks/2/type = "value"
|
||||
tracks/2/imported = false
|
||||
tracks/2/enabled = true
|
||||
tracks/2/path = NodePath("AnimatedSprite2D:position")
|
||||
tracks/2/interp = 1
|
||||
tracks/2/loop_wrap = true
|
||||
tracks/2/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [Vector2(853, 282)]
|
||||
}
|
||||
tracks/3/type = "value"
|
||||
tracks/3/imported = false
|
||||
tracks/3/enabled = true
|
||||
tracks/3/path = NodePath("AnimatedSprite2D:rotation")
|
||||
tracks/3/interp = 1
|
||||
tracks/3/loop_wrap = true
|
||||
tracks/3/keys = {
|
||||
"times": PackedFloat32Array(0),
|
||||
"transitions": PackedFloat32Array(1),
|
||||
"update": 0,
|
||||
"values": [1.5708]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_wbjam"]
|
||||
resource_name = "attackInverse1"
|
||||
length = 0.3
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("AnimatedSprite2D:speed_scale")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 0.3),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [1.0, 2.0]
|
||||
}
|
||||
|
||||
[sub_resource type="Animation" id="Animation_yiill"]
|
||||
resource_name = "attackInverse2"
|
||||
length = 0.5
|
||||
tracks/0/type = "value"
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/path = NodePath("AnimatedSprite2D:animation")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/keys = {
|
||||
"times": PackedFloat32Array(0, 0.1),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 1,
|
||||
"values": [&"charging", &"fire"]
|
||||
}
|
||||
tracks/1/type = "value"
|
||||
tracks/1/imported = false
|
||||
tracks/1/enabled = true
|
||||
tracks/1/path = NodePath("AnimatedSprite2D:position")
|
||||
tracks/1/interp = 1
|
||||
tracks/1/loop_wrap = true
|
||||
tracks/1/keys = {
|
||||
"times": PackedFloat32Array(0.1, 0.5),
|
||||
"transitions": PackedFloat32Array(1, 1),
|
||||
"update": 0,
|
||||
"values": [Vector2(853, 282), Vector2(320, 304)]
|
||||
}
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_ovgc5"]
|
||||
_data = {
|
||||
"RESET": SubResource("Animation_kbyea"),
|
||||
@ -1278,6 +1316,7 @@ libraries = {
|
||||
}
|
||||
|
||||
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
|
||||
visible = false
|
||||
position = Vector2(353, 282)
|
||||
rotation = 1.5708
|
||||
scale = Vector2(1e-05, 1e-05)
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@ -3,5 +3,6 @@ extends AnimationBase
|
||||
@onready var particles: GPUParticles2D = $GPUParticles2D
|
||||
|
||||
func die():
|
||||
animationPlayer.play("RESET")
|
||||
particles.emitting = false
|
||||
await get_tree().create_timer(particles.lifetime).timeout
|
||||
queue_free()
|
||||
|
@ -18,6 +18,7 @@ var anim: AnimationBase
|
||||
var casting: bool = false
|
||||
var castCooldown: float = 0
|
||||
var castProgress: int = 0
|
||||
var defending: Array[Spell]
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
@ -76,9 +77,6 @@ func cast() -> void:
|
||||
attemptCast()
|
||||
|
||||
func attemptCast():
|
||||
#if (!casting):
|
||||
#_finishedCasting()
|
||||
#return
|
||||
match data.difficulty:
|
||||
Data.Difficulty.EASY:
|
||||
await get_tree().create_timer(randf_range(0.75, 1.75)).timeout
|
||||
@ -92,12 +90,13 @@ func attemptCast():
|
||||
castProgress = 0
|
||||
renderer.play("attack1")
|
||||
spellbook.cooldowns[spellIndex] = spell.cooldown
|
||||
defending.append(spell)
|
||||
_finishedCasting()
|
||||
return
|
||||
else:
|
||||
attemptCast()
|
||||
else:
|
||||
alterHealth(-spell.backfireStrength, true)
|
||||
alterHealth(-spell.backfireStrength, true, spell.element)
|
||||
failCast()
|
||||
return
|
||||
Data.Difficulty.NORMAL:
|
||||
@ -112,12 +111,13 @@ func attemptCast():
|
||||
castProgress = 0
|
||||
renderer.play("attack1")
|
||||
spellbook.cooldowns[spellIndex] = spell.cooldown
|
||||
defending.append(spell)
|
||||
_finishedCasting()
|
||||
return
|
||||
else:
|
||||
attemptCast()
|
||||
else:
|
||||
alterHealth(-spell.backfireStrength, true)
|
||||
alterHealth(-spell.backfireStrength, true, spell.element)
|
||||
failCast()
|
||||
Data.Difficulty.HARD:
|
||||
await get_tree().create_timer(randf_range(0.3, 0.75)).timeout
|
||||
@ -131,12 +131,13 @@ func attemptCast():
|
||||
castProgress = 0
|
||||
renderer.play("attack1")
|
||||
spellbook.cooldowns[spellIndex] = spell.cooldown
|
||||
defending.append(spell)
|
||||
_finishedCasting()
|
||||
return
|
||||
else:
|
||||
attemptCast()
|
||||
else:
|
||||
alterHealth(-spell.backfireStrength, true)
|
||||
alterHealth(-spell.backfireStrength, true, spell.element)
|
||||
failCast()
|
||||
Data.Difficulty.GAMER:
|
||||
await get_tree().create_timer(.2).timeout
|
||||
@ -149,13 +150,16 @@ func attemptCast():
|
||||
castProgress = 0
|
||||
renderer.play("attack1")
|
||||
spellbook.cooldowns[spellIndex] = spell.cooldown
|
||||
data.player.alterHealth(-spell.damage, false)
|
||||
defending.append(spell)
|
||||
_finishedCasting()
|
||||
return
|
||||
else:
|
||||
attemptCast()
|
||||
|
||||
func alterHealth(change: float, stun: bool) -> void:
|
||||
func alterHealth(change: float, stun: bool, element: Data.Element) -> void:
|
||||
for spel in defending:
|
||||
change *= spel.blockStrength[element]
|
||||
print("Blocking with spell " + spel.name)
|
||||
health += change
|
||||
if stun:
|
||||
casting = false
|
||||
@ -179,7 +183,8 @@ func animationFinished() -> void:
|
||||
renderer.play("idle")
|
||||
|
||||
func finalizeSpell(finish: Spell) -> void:
|
||||
defending.erase(spell)
|
||||
if (player):
|
||||
data.opponent.alterHealth(-finish.damage, finish.stunning)
|
||||
data.opponent.alterHealth(-finish.damage, finish.stunning, finish.element)
|
||||
else:
|
||||
data.player.alterHealth(-finish.damage, finish.stunning)
|
||||
data.player.alterHealth(-finish.damage, finish.stunning, finish.element)
|
||||
|
@ -31,9 +31,7 @@ func _process(delta):
|
||||
spellIndex = i
|
||||
castIndicator.show()
|
||||
castIndicator.setDirs(spell.castCombo[0], spell.castCombo[1])
|
||||
print(spell.animation)
|
||||
anim = data.animations[spell.animation].instantiate()
|
||||
print(anim.name)
|
||||
anim.setProgress(0, spell.castCombo.size())
|
||||
anim.spell = spell
|
||||
anim.connect("animationFinished", avatar.finalizeSpell)
|
||||
@ -55,9 +53,10 @@ func _process(delta):
|
||||
avatar.castProgress = 0
|
||||
avatar.renderer.play("attack1")
|
||||
data.spellbook.cooldowns[spellIndex] = spell.cooldown
|
||||
avatar.defending.append(spell)
|
||||
castIndicator.hide()
|
||||
elif (timer >= spell.timeout || Input.is_action_just_pressed("up") || Input.is_action_just_pressed("down") || Input.is_action_just_pressed("left") || Input.is_action_just_pressed("right")):
|
||||
avatar.alterHealth(-spell.backfireStrength, true)
|
||||
avatar.alterHealth(-spell.backfireStrength, true, spell.element)
|
||||
stunned()
|
||||
|
||||
for i in range(data.spellbook.cooldowns.size()):
|
||||
|
Loading…
x
Reference in New Issue
Block a user