Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skalowanie przeciwników #270

Draft
wants to merge 3 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Assets/Enemies/Goblin_Shaman.png.import
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=true
detect_3d=false
svg/scale=1.0
1 change: 1 addition & 0 deletions Assets/Enemies/cuck.png.import
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=false
Expand Down
1 change: 1 addition & 0 deletions Assets/Enemies/cuckbullet.png.import
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=false
Expand Down
1 change: 1 addition & 0 deletions Assets/Enemies/cuckbulletupdated.png.import
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=false
Expand Down
1 change: 1 addition & 0 deletions Assets/Enemies/cuckshooter.png.import
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=false
Expand Down
1 change: 1 addition & 0 deletions Assets/Enemies/cuckshooterupdated.png.import
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=false
Expand Down
1 change: 1 addition & 0 deletions Assets/Enemies/fireball_new.png.import
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=true
Expand Down
1 change: 1 addition & 0 deletions Assets/Enemies/fireball_old.png.import
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=true
Expand Down
1 change: 1 addition & 0 deletions Assets/Enemies/goblin_ball.png.import
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=true
Expand Down
1 change: 1 addition & 0 deletions Assets/Enemies/snot.png.import
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=false
Expand Down
1 change: 1 addition & 0 deletions Assets/Loot/Weapons/FMS.png.import
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=false
Expand Down
1 change: 1 addition & 0 deletions Assets/Loot/Weapons/FMS0.png.import
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=false
Expand Down
1 change: 1 addition & 0 deletions Assets/Loot/Weapons/FMS1.png.import
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=false
Expand Down
1 change: 1 addition & 0 deletions Assets/Loot/Weapons/FMS2.png.import
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=false
Expand Down
1 change: 1 addition & 0 deletions Assets/Loot/Weapons/FMS3.png.import
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=false
Expand Down
1 change: 1 addition & 0 deletions Assets/Loot/Weapons/FMS4.png.import
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=false
Expand Down
1 change: 1 addition & 0 deletions Assets/npc/sklep.png.import
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=true
Expand Down
22 changes: 22 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur.
Copyright (c) 2014-2022 Godot Engine contributors.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

-- Godot Engine <https://godotengine.org>
8 changes: 4 additions & 4 deletions Scenes/Actors/Big Devil.gd
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ var player = null
var player_close = false
var move = Vector2.ZERO
export var speed = 0.25
export var dps = 1
export onready var dps = 1 * Bufor.damagemultiplier
var right = 1
var attack = false
export var max_hp = 30
var hp:float = max_hp
export onready var max_hp = 30 * Bufor.healthmultiplier
onready var hp = max_hp

export var health = 100
var drop = {"minCoins":0,"maxCoins":5}
Expand Down Expand Up @@ -242,7 +242,7 @@ func random_potion():
potion = int(rng.randi_range(2,3))
else:
potion = int(rng.randi_range(0,2))
print(potion)
print("[INFO]: at " + self.name + ": potion dropped: " + str(potion))
var tmp

if potion == 0:
Expand Down
2 changes: 1 addition & 1 deletion Scenes/Actors/CucksBullet.gd
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ var move = Vector2.ZERO
var look_vec = Vector2.ZERO #kierunek pocisku
var player = null
var speed = 1 #predkosc pocisku
var dps = 5 #zadawany damage przez pocisk
onready var dps = 5 * Bufor.damagemultiplier #zadawany damage przez pocisk
onready var statusEffect = get_node("../UI/StatusBar")

# === KNOCKBACK === #
Expand Down
1 change: 1 addition & 0 deletions Scenes/Actors/EnemyProjectileShield.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,5 @@ lifetime = 5.0
preprocess = 4.0
visibility_rect = Rect2( 0, 0, 0, 48.9708 )
process_material = SubResource( 8 )

[connection signal="body_entered" from="." to="." method="_on_EnemyProjectileShield_body_entered"]
4 changes: 2 additions & 2 deletions Scenes/Actors/EnemyTemplate.gd
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ var attack = false # zmienna ataku (czy atakuje)
# === ====================== === #

# === HP === #
export var max_hp = 30 # wartość życia przeciwnika
var hp:float = max_hp
export onready var max_hp = 30 * Bufor.healthmultiplier # wartość życia przeciwnika
var hp = max_hp
# === == === #

# === HEALTHBAR === #
Expand Down
2 changes: 1 addition & 1 deletion Scenes/Actors/Laser.gd
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ onready var statusEffect = get_node("../UI/StatusBar")

var player_Pos = Vector2.ZERO
onready var origin = self.position
var dmg = 1
onready var dmg = 1 * Bufor.damagemultiplier

var is_casting := false setget set_is_casting # zmienna warunkująca czy laser jest emitowany, := to przypisanie typu do zmiennej, is_casting to bool setget set_is_casting - set_is_casting zostaje wywołana moment zanim is_casting zostanie zmieniona, decyduje co zrobić z is_casting

Expand Down
7 changes: 4 additions & 3 deletions Scenes/Actors/Lil Devil.gd
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ var player = null
var move = Vector2.ZERO
var right = 1 # zwrot prawo/lewo sprite'a
var attack = false
export var max_hp = 30 # wartość życia Lil Devila
var hp:float = max_hp
export onready var max_hp = 30 * Bufor.healthmultiplier# wartość życia Lil Devila
onready var hp = max_hp


export var health = 100 # procentowa wartość życia do healthbara
onready var health_bar = $HealthBar # deklaracja odwołania do node $HealthBar
Expand Down Expand Up @@ -174,7 +175,7 @@ func random_potion():
rng.randomize()
var potion
potion = int(rng.randi_range(0,1))
print(potion)
print("[INFO]: at " + self.name + ": potion dropped: " + str(potion))
var tmp
if potion == 0:
tmp = load("res://Scenes/Loot/20healthPotion.tscn")
Expand Down
8 changes: 4 additions & 4 deletions Scenes/Actors/Little_Goblin.gd
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ signal died(body)
var player = null #Zmienna przechowująca węzeł gracza
var move = Vector2.ZERO #Zmienna inicjująca wektor poruszania
export var speed = 1.5 #Zmienna przechowująca szybkość poruszania
export var dps = 10 #Zmienna przechowująca wartość ataku
export onready var dps = 10 * Bufor.damagemultiplier #Zmienna przechowująca wartość ataku
var right = 0.155 #Kierunek obrócenia
var attack = false #Czy atakuje
var max_hp = 30 #Zmienna przechowywująca ilość życia
var hp:float = max_hp #Zmienna przechowuje ilość pozostałego życia
onready var max_hp = 30 * Bufor.healthmultiplier #Zmienna przechowywująca ilość życia
onready var hp = max_hp #Zmienna przechowuje ilość pozostałego życia

export var health = 100 #Pozostałe życie w procentach

Expand Down Expand Up @@ -140,7 +140,7 @@ func random_potion():
rng.randomize()
var potion
potion = int(rng.randi_range(0,1))
print(potion)
print("[INFO]: at " + self.name + ": potion dropped: " + str(potion))
var tmp
if potion == 0:
tmp = load("res://Scenes/Loot/20healthPotion.tscn")
Expand Down
9 changes: 3 additions & 6 deletions Scenes/Actors/MageBoss/MageBoss.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@

[ext_resource path="res://Scenes/Actors/MageBoss/MageBoss.gd" type="Script" id=1]
[ext_resource path="res://Assets/Light/Light.tscn" type="PackedScene" id=2]
[ext_resource path="res://Assets/Enemies/waterball.png" type="Texture" id=3]
[ext_resource path="res://Assets/Enemies/fireball_new.png" type="Texture" id=4]
[ext_resource path="res://Assets/Enemies/WaterBall.png" type="Texture" id=5]
[ext_resource path="res://Assets/Enemies/windball.png" type="Texture" id=6]
[ext_resource path="res://Assets/Enemies/earthball.png" type="Texture" id=7]


[sub_resource type="Gradient" id=1]
offsets = PoolRealArray( 0, 0.244444, 0.525926, 0.777778, 1 )
colors = PoolColorArray( 0.654902, 0.839216, 0.92549, 1, 0, 0.32549, 0.85098, 1, 0.960784, 0.486275, 0.00392157, 1, 0.262745, 0.203922, 0.152941, 1, 0.65098, 0.827451, 0.913725, 1 )
Expand Down Expand Up @@ -208,9 +207,7 @@ tracks/6/keys = {
"values": [ SubResource( 1 ), SubResource( 20 ) ]
}

[node name="MageBoss" type="KinematicBody2D" groups=[
"Enemy",
]]
[node name="MageBoss" type="KinematicBody2D" groups=["Enemy"]]
collision_layer = 4
collision_mask = 3
script = ExtResource( 1 )
Expand Down Expand Up @@ -271,7 +268,7 @@ local_coords = false
process_material = SubResource( 15 )

[node name="Sprite" type="Sprite" parent="WaterFireCenter/Waterball"]
texture = ExtResource( 5 )
texture = ExtResource( 3 )

[node name="Light2D2" parent="WaterFireCenter/Waterball" instance=ExtResource( 2 )]
scale = Vector2( 0.2, 0.2 )
Expand Down
6 changes: 3 additions & 3 deletions Scenes/Actors/MageBoss/Summon.gd
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ func _ready():
$Particles2D.texture = load("res://Assets/Enemies/fireball_new.png")
elif boss.phase == 2:
$WaterL.visible = true #włącza odpowiednie światło
$Particles2D.texture = load("res://Assets/Enemies/WaterBall.png")
$Particles2D.texture = load("res://Assets/Enemies/waterball.png")
elif boss.phase == 3:
$EarthL.visible = true
$Particles2D.texture = load("res://Assets/Enemies/EarthBall.png")
$Particles2D.texture = load("res://Assets/Enemies/earthball.png")
elif boss.phase == 4:
$WindL.visible = true #włącza odpowiednie światło
$Particles2D.texture = load("res://Assets/Enemies/WindBall.png")
$Particles2D.texture = load("res://Assets/Enemies/windball.png")

func _physics_process(delta):
move = Vector2.ZERO
Expand Down
10 changes: 5 additions & 5 deletions Scenes/Actors/Orc.gd
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ var attack = false # zmienna ataku (czy atakuje)
# === ====================== === #

# === HP === #
export var max_hp = 30 # wartość życia przeciwnika
var hp:float = max_hp
export onready var max_hp = 30 * Bufor.healthmultiplier # wartość życia przeciwnika
onready var hp = max_hp
# === == === #

# === DPS === #
export var dps = 10
export onready var dps = 10 * Bufor.damagemultiplier
# === == === #

# === HEALTHBAR === #
Expand Down Expand Up @@ -191,7 +191,7 @@ func get_dmg(dmg, weaponKnockback):
# === ZMNIEJSZANIE HP === #
hp -= dmg # zmniejszanie hp o otrzymany dmg
health = hp/max_hp*100 # procentowo się zmienia ilośc hp na pasku
# Animacje obrażeń zostają aktywowane na sprite Body i Head
# Animacja obrażeń własnych
$BodyAnimationPlayer.play("Hurt")

health_bar.on_health_updated(health) # healthbar zostaje zupdateowany z nową procentową ilością hp
Expand Down Expand Up @@ -247,7 +247,7 @@ func random_potion():
potion = int(rng.randi_range(2,3))
else:
potion = int(rng.randi_range(0,3))
print(potion)
print("[INFO]: at " + self.name + ": potion dropped: " + str(potion))
var tmp
if potion == 0:
tmp = load("res://Scenes/Loot/20healthPotion.tscn")
Expand Down
Loading