...
 
Commits (3)
......@@ -3,7 +3,7 @@
[ext_resource path="res://characters/NPC.tscn" type="PackedScene" id=1]
[ext_resource path="res://characters/Thief.gd" type="Script" id=2]
[node name="Thief" index="0" instance=ExtResource( 1 )]
[node name="Thief" instance=ExtResource( 1 )]
script = ExtResource( 2 )
[node name="Sprite" parent="." index="0"]
......
extends Tool
var attackPower := 0.25
func _init():
coolDownInSecs = 1.0
chanceToBreak = 0.05
costAmount = 10
costTime = 15.0
toolName = "Club"
descr = "Not a bad weapon, but has a smallish chance to break."
func useImplementation() -> void:
useToolToAttack(attackPower)
func showTarget():
showTargetForWeapon()
[gd_scene load_steps=5 format=2]
[ext_resource path="res://scenes/Tool.tscn" type="PackedScene" id=1]
[ext_resource path="res://scenes/Club.gd" type="Script" id=2]
[ext_resource path="res://gfx/club.png" type="Texture" id=3]
[sub_resource type="Animation" id=1]
resource_name = "use"
tracks/0/type = "value"
tracks/0/path = NodePath("Sprite:rotation_degrees")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.9, 1 ),
"transitions": PoolRealArray( 1, 1, 1 ),
"update": 0,
"values": [ 0.0, -50.0, 0.0 ]
}
[node name="Club" instance=ExtResource( 1 )]
script = ExtResource( 2 )
[node name="AnimationPlayer" parent="." index="0"]
anims/use = SubResource( 1 )
[node name="Sprite" type="Sprite" parent="." index="2"]
texture = ExtResource( 3 )
offset = Vector2( 25, -3 )
......@@ -9,7 +9,7 @@ func _init():
costAmount = 0
costTime = 0.0
toolName = "Dagger"
descr = "Weak and faithful. Never breaks, but is a weak weapon"
descr = "An old dagger. Never breaks, but doesn't damage much more than a mosquito bite."
func useImplementation() -> void:
......
......@@ -4,7 +4,7 @@ var fixPower := 0.0
func _init():
coolDownInSecs = 4.0
coolDownInSecs = 2.0
chanceToBreak = 0.01
costAmount = 10
costTime = 15.0
......
......@@ -20,7 +20,7 @@ tracks/0/keys = {
"values": [ 0.0, -65.0, 0.0, -65.0, 0.0 ]
}
[node name="Hammer" index="0" instance=ExtResource( 1 )]
[node name="Hammer" instance=ExtResource( 1 )]
script = ExtResource( 2 )
[node name="AnimationPlayer" parent="." index="0"]
......
extends Tool
var fixPower := 0.0
func _init():
coolDownInSecs = 1.5
chanceToBreak = 0.15
costAmount = 22
costTime = 18.0
toolName = "Power Tool"
descr = "Fixes machinery as no other tool, but breaks easily."
fixPower = Globals.MACHINE_DECAY_RATE * coolDownInSecs * 8.0
func useImplementation() -> void:
useToolToFix(fixPower)
func showTarget():
showTargetForTool()
[gd_scene load_steps=5 format=2]
[ext_resource path="res://scenes/Tool.tscn" type="PackedScene" id=1]
[ext_resource path="res://scenes/PowerTool.gd" type="Script" id=2]
[ext_resource path="res://gfx/power-tool.png" type="Texture" id=3]
[sub_resource type="Animation" id=1]
resource_name = "use"
length = 1.5
tracks/0/type = "value"
tracks/0/path = NodePath("Sprite:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.3, 0.6, 0.9, 1.2, 1.5 ),
"transitions": PoolRealArray( 1, 1, 1, 1, 1, 1 ),
"update": 0,
"values": [ Vector2( 0, 0 ), Vector2( 4, -3 ), Vector2( -1, 2 ), Vector2( -2.6, -1.2 ), Vector2( 2, -2 ), Vector2( 0, 0 ) ]
}
tracks/1/type = "value"
tracks/1/path = NodePath("Sprite:rotation_degrees")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0, 0.3, 0.6, 0.9, 1.2, 1.5 ),
"transitions": PoolRealArray( 1, 1, 1, 1, 1, 1 ),
"update": 0,
"values": [ 0.0, 5.0, -3.0, 4.0, -3.0, 0.0 ]
}
[node name="PowerTool" instance=ExtResource( 1 )]
script = ExtResource( 2 )
[node name="AnimationPlayer" parent="." index="0"]
anims/use = SubResource( 1 )
[node name="Sprite" type="Sprite" parent="." index="2"]
position = Vector2( -1.06667, -1.46667 )
rotation = 0.0290888
texture = ExtResource( 3 )
offset = Vector2( 20, 0 )
extends Tool
var attackPower := 1.2
func _init():
coolDownInSecs = 1.0
chanceToBreak = 0.12
costAmount = 15
costTime = 20.0
toolName = "Sword"
descr = "Low quality sword. One-hit kills, but breaks easily."
func useImplementation() -> void:
useToolToAttack(attackPower)
func showTarget():
showTargetForWeapon()
[gd_scene load_steps=5 format=2]
[ext_resource path="res://scenes/Tool.tscn" type="PackedScene" id=1]
[ext_resource path="res://scenes/Sword.gd" type="Script" id=2]
[ext_resource path="res://gfx/sword.png" type="Texture" id=3]
[sub_resource type="Animation" id=1]
resource_name = "use"
tracks/0/type = "value"
tracks/0/path = NodePath("Sprite:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.5, 0.6, 0.991873 ),
"transitions": PoolRealArray( 1, 1, 1, 1 ),
"update": 0,
"values": [ Vector2( 0, 0 ), Vector2( -5, 0 ), Vector2( 6, 0 ), Vector2( 0, 0 ) ]
}
tracks/1/type = "value"
tracks/1/path = NodePath("Sprite:rotation_degrees")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0, 0.5, 0.6, 1 ),
"transitions": PoolRealArray( 1, 1, 1, 1 ),
"update": 0,
"values": [ 0.0, -35.0, 29.0, 0.0 ]
}
[node name="Sword" instance=ExtResource( 1 )]
script = ExtResource( 2 )
[node name="AnimationPlayer" parent="." index="0"]
anims/use = SubResource( 1 )
[node name="Sprite" type="Sprite" parent="." index="2"]
texture = ExtResource( 3 )
offset = Vector2( 20, 0 )
......@@ -4,7 +4,7 @@ var fixPower := 0.0
func _init():
coolDownInSecs = 5.0
coolDownInSecs = 3.0
chanceToBreak = 0.0
costAmount = 0
costTime = 0.0
......
[gd_scene load_steps=20 format=2]
[gd_scene load_steps=25 format=2]
[ext_resource path="res://ui/Mint.gd" type="Script" id=1]
[ext_resource path="res://ui/mint-tileset.tres" type="TileSet" id=2]
......@@ -12,11 +12,16 @@
[ext_resource path="res://scenes/Hammer.tscn" type="PackedScene" id=10]
[ext_resource path="res://gfx/wrench.png" type="Texture" id=11]
[ext_resource path="res://scenes/Wrench.tscn" type="PackedScene" id=12]
[ext_resource path="res://gfx/dagger.png" type="Texture" id=13]
[ext_resource path="res://scenes/Dagger.tscn" type="PackedScene" id=14]
[ext_resource path="res://gfx/coin.png" type="Texture" id=15]
[ext_resource path="res://gfx/planchet.png" type="Texture" id=16]
[ext_resource path="res://characters/Thief.tscn" type="PackedScene" id=17]
[ext_resource path="res://gfx/power-tool.png" type="Texture" id=13]
[ext_resource path="res://scenes/PowerTool.tscn" type="PackedScene" id=14]
[ext_resource path="res://gfx/dagger.png" type="Texture" id=15]
[ext_resource path="res://scenes/Dagger.tscn" type="PackedScene" id=16]
[ext_resource path="res://gfx/club.png" type="Texture" id=17]
[ext_resource path="res://scenes/Club.tscn" type="PackedScene" id=18]
[ext_resource path="res://gfx/sword.png" type="Texture" id=19]
[ext_resource path="res://scenes/Sword.tscn" type="PackedScene" id=20]
[ext_resource path="res://gfx/coin.png" type="Texture" id=21]
[ext_resource path="res://gfx/planchet.png" type="Texture" id=22]
[sub_resource type="NavigationPolygon" id=2]
vertices = PoolVector2Array( 980, 510, 590, 510, 610, 480, 629, 480, 940, 250, 940, 220, 960, 220, 960, 250, 960, 450, 960, 480, 939, 480, 939, 450, 60, 480, 570, 510, 40, 220, 20, 220, 20, 20, 320, 20, 320, 170, 350, 170, 350, 20, 650, 20, 650, 170, 680, 170, 680, 20, 980, 20, 980, 220, 680, 200, 680, 220, 650, 200, 650, 220, 350, 220, 350, 200, 320, 200, 60, 220, 320, 220, 60, 250, 40, 250, 320, 250, 320, 270, 350, 270, 350, 250, 650, 250, 650, 270, 649, 290, 629, 450, 680, 270, 680, 250, 980, 250, 980, 450, 679, 450, 679, 290, 649, 450, 980, 480, 610, 450, 350, 450, 350, 290, 320, 290, 320, 450, 60, 450, 590, 540, 980, 540, 980, 700, 550, 700, 550, 540, 570, 540, 500, 510, 500, 540, 520, 540, 520, 700, 20, 700, 20, 540, 480, 540, 480, 510, 20, 510, 40, 480, 20, 480, 40, 450, 20, 450, 20, 250 )
......@@ -245,20 +250,35 @@ __meta__ = {
}
[node name="HammerPoint" parent="Office" instance=ExtResource( 8 )]
position = Vector2( 560, 690 )
position = Vector2( 570, 669 )
texture = ExtResource( 9 )
toolScene = ExtResource( 10 )
[node name="WrenchPoint" parent="Office" instance=ExtResource( 8 )]
position = Vector2( 640, 690 )
position = Vector2( 641, 669 )
texture = ExtResource( 11 )
toolScene = ExtResource( 12 )
[node name="DaggerPoint" parent="Office" instance=ExtResource( 8 )]
position = Vector2( 740, 690 )
[node name="PowerToolPoint" parent="Office" instance=ExtResource( 8 )]
position = Vector2( 711, 669 )
texture = ExtResource( 13 )
toolScene = ExtResource( 14 )
[node name="DaggerPoint" parent="Office" instance=ExtResource( 8 )]
position = Vector2( 808, 671 )
texture = ExtResource( 15 )
toolScene = ExtResource( 16 )
[node name="ClubPoint" parent="Office" instance=ExtResource( 8 )]
position = Vector2( 884, 671 )
texture = ExtResource( 17 )
toolScene = ExtResource( 18 )
[node name="SwordPoint" parent="Office" instance=ExtResource( 8 )]
position = Vector2( 960, 671 )
texture = ExtResource( 19 )
toolScene = ExtResource( 20 )
[node name="Label" type="Label" parent="Office"]
margin_left = 540.0
margin_top = 530.0
......@@ -288,30 +308,30 @@ align = 1
[node name="OldCoin1" type="Sprite" parent="Reception"]
position = Vector2( 252, 686 )
scale = Vector2( 0.3, 0.3 )
texture = ExtResource( 15 )
texture = ExtResource( 21 )
[node name="OldCoin2" type="Sprite" parent="Reception"]
modulate = Color( 1, 0.67451, 0.67451, 1 )
position = Vector2( 282, 686 )
scale = Vector2( 0.3, 0.3 )
texture = ExtResource( 15 )
texture = ExtResource( 21 )
[node name="OldCoin3" type="Sprite" parent="Reception"]
position = Vector2( 312, 686 )
scale = Vector2( 0.3, 0.3 )
texture = ExtResource( 16 )
texture = ExtResource( 22 )
[node name="OldCoin4" type="Sprite" parent="Reception"]
modulate = Color( 0.996078, 0.847059, 1, 1 )
position = Vector2( 342, 686 )
scale = Vector2( 0.3, 0.3 )
texture = ExtResource( 15 )
texture = ExtResource( 21 )
[node name="OldCoin5" type="Sprite" parent="Reception"]
modulate = Color( 0.682353, 0.682353, 0, 1 )
position = Vector2( 372, 686 )
scale = Vector2( 0.3, 0.3 )
texture = ExtResource( 16 )
texture = ExtResource( 22 )
[node name="NavPoints" type="Node2D" parent="."]
editor/display_folded = true
......@@ -708,8 +728,5 @@ position = Vector2( 110, 620 )
__meta__ = {
"_edit_lock_": true
}
[node name="Thief" parent="." instance=ExtResource( 17 )]
position = Vector2( 420, 30 )
[connection signal="timeout" from="Courtyard/InTimer" to="." method="_on_InTimer_timeout"]
[connection signal="timeout" from="Courtyard/OutTimer" to="." method="_on_OutTimer_timeout"]
......@@ -51,5 +51,6 @@ func createTool() -> void:
func destroyTool() -> void:
Globals.showToast("Your %s has broken!" % _tool.toolName)
_tool = null
self_modulate = Color(1.0, 1.0, 1.0, 0.25)