summaryrefslogtreecommitdiff
path: root/Scenes
diff options
context:
space:
mode:
authorVictor Andrade de Almeida <vct.a.almeida@gmail.com>2022-07-17 04:09:19 -0300
committerVictor Andrade de Almeida <vct.a.almeida@gmail.com>2022-07-17 04:09:19 -0300
commit795ffde4e100b83175cdb386481fb770c82c8b77 (patch)
tree9d8cb9e3f52bbe0e03a6bc7f1720ebe707ed4ead /Scenes
parente5a6000694f2f27d3eac1c77b79dfd792bd9f14e (diff)
downloadgamejam-gmtk-2022-795ffde4e100b83175cdb386481fb770c82c8b77.tar.gz
gamejam-gmtk-2022-795ffde4e100b83175cdb386481fb770c82c8b77.tar.bz2
gamejam-gmtk-2022-795ffde4e100b83175cdb386481fb770c82c8b77.zip
Recolor dice
Diffstat (limited to 'Scenes')
-rw-r--r--Scenes/Entity.gd2
-rw-r--r--Scenes/PlateDamage.gd8
-rw-r--r--Scenes/PlateDamage.tscn2
-rw-r--r--Scenes/Player.gd2
-rw-r--r--Scenes/Player.tscn6
5 files changed, 8 insertions, 12 deletions
diff --git a/Scenes/Entity.gd b/Scenes/Entity.gd
index 63ab008..649d01b 100644
--- a/Scenes/Entity.gd
+++ b/Scenes/Entity.gd
@@ -50,7 +50,7 @@ func cor_shake(args : Array):
var time = 0
var zero = translation
- var intensity = 0.02
+ var intensity = 0.03
while true:
time = min(time + get_process_delta_time(), duration)
diff --git a/Scenes/PlateDamage.gd b/Scenes/PlateDamage.gd
index 310ac39..d910f76 100644
--- a/Scenes/PlateDamage.gd
+++ b/Scenes/PlateDamage.gd
@@ -1,19 +1,17 @@
extends Plate
-export(int) var damage
-
func activate(entity : Entity, dungeon):
if entity is Player:
entity.add_action("cor_shake", [0.2])
- Global.turns -= damage
+ Global.turns -= int(entity.get_top())
return
if entity is Monster:
- if entity.health - damage <= 0:
+ if entity.health - 1 <= 0:
entity.alive = false
entity.add_action("cor_dies", [])
dungeon.kill_entity(entity)
else:
- entity.health -= damage
+ entity.health -= 1
entity.add_action("cor_shake", [0.2])
return
diff --git a/Scenes/PlateDamage.tscn b/Scenes/PlateDamage.tscn
index 039597f..f3a0ec9 100644
--- a/Scenes/PlateDamage.tscn
+++ b/Scenes/PlateDamage.tscn
@@ -7,8 +7,6 @@ size = Vector3( 0.1, 0.1, 0.1 )
[node name="PlateDamage" type="Spatial"]
script = ExtResource( 1 )
-valid_symbols = [ "2", "3", "4", "5", "6", "" ]
-damage = 3
[node name="Mesh" type="MeshInstance" parent="."]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -0.45, 0.05, 0.45 )
diff --git a/Scenes/Player.gd b/Scenes/Player.gd
index 5af227b..21d182e 100644
--- a/Scenes/Player.gd
+++ b/Scenes/Player.gd
@@ -141,7 +141,7 @@ func cor_shake(args : Array):
var time = 0
var zero = Vector3(0, 0.5, 0)
- var intensity = 0.02
+ var intensity = 0.03
while true:
time = min(time + get_process_delta_time(), duration)
diff --git a/Scenes/Player.tscn b/Scenes/Player.tscn
index 4d67f5e..0ec3d52 100644
--- a/Scenes/Player.tscn
+++ b/Scenes/Player.tscn
@@ -1,11 +1,11 @@
[gd_scene load_steps=14 format=2]
[ext_resource path="res://Scenes/Player.gd" type="Script" id=1]
+[ext_resource path="res://Assets/2_dots_blue.png" type="Texture" id=2]
[ext_resource path="res://Assets/5_dots.png" type="Texture" id=3]
[ext_resource path="res://Assets/DiceFaceMaterial.tres" type="Material" id=4]
-[ext_resource path="res://Assets/3_dots.png" type="Texture" id=5]
+[ext_resource path="res://Assets/3_dots_blue.png" type="Texture" id=5]
[ext_resource path="res://Assets/4_dots.png" type="Texture" id=6]
-[ext_resource path="res://Assets/2_dots.png" type="Texture" id=7]
[ext_resource path="res://Assets/6_dots.png" type="Texture" id=8]
[sub_resource type="QuadMesh" id=5]
@@ -14,7 +14,7 @@
albedo_texture = ExtResource( 8 )
[sub_resource type="SpatialMaterial" id=7]
-albedo_texture = ExtResource( 7 )
+albedo_texture = ExtResource( 2 )
[sub_resource type="SpatialMaterial" id=8]
albedo_texture = ExtResource( 3 )